mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-07 00:50:50 +00:00
Remove trailing whitespace.
This commit is contained in:
parent
010f5413b5
commit
709e8f9ae1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8857
|
@ -1,5 +1,5 @@
|
|||
# from: @(#)Makefile 5.11 (Berkeley) 5/21/91
|
||||
# $Id: Makefile,v 1.115 1995/05/11 05:22:29 jkh Exp $
|
||||
# $Id: Makefile,v 1.116 1995/05/13 16:58:37 ache Exp $
|
||||
|
||||
# disktab may be wrong -- hcx9 is a tahoe, but gets its own.
|
||||
# -rw-r--r--
|
||||
|
@ -46,7 +46,7 @@ WCS2= fpevent fppwcs fppwcs_dual hdcwcs load_diags start_fpp wcs wcs_dual
|
|||
|
||||
# Special top level files for FreeBSD
|
||||
COPYRIGHT= COPYRIGHT
|
||||
FREEBSD=
|
||||
FREEBSD=
|
||||
FREEBSD+= ${COPYRIGHT}
|
||||
#
|
||||
# Floppy drive name, mount point, type and parameters for building Floppies
|
||||
|
|
|
@ -129,7 +129,7 @@ pw_scan(bp, pw)
|
|||
break;
|
||||
}
|
||||
if (!strcmp(p, sh))
|
||||
break;
|
||||
break;
|
||||
}
|
||||
if(p[0]) pw->pw_fields |= _PWF_SHELL;
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ pw_init()
|
|||
int
|
||||
pw_lock()
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* If the master password file doesn't exist, the system is hosed.
|
||||
* Might as well try to build one. Set the close-on-exec bit so
|
||||
* that users can't get at the encrypted passwords while editing.
|
||||
|
@ -167,7 +167,7 @@ pw_edit(notsetuid)
|
|||
editor = _PATH_VI;
|
||||
if (p = strrchr(editor, '/'))
|
||||
++p;
|
||||
else
|
||||
else
|
||||
p = editor;
|
||||
|
||||
if (!(editpid = vfork())) {
|
||||
|
|
|
@ -40,7 +40,7 @@ static char copyright[] =
|
|||
#ifndef lint
|
||||
/*static char sccsid[] = "From: @(#)sysctl.c 8.1 (Berkeley) 6/6/93"; */
|
||||
static const char rcsid[] =
|
||||
"$Id: sysctl.c,v 1.4 1995/02/16 00:28:42 wollman Exp $";
|
||||
"$Id: sysctl.c,v 1.5 1995/05/12 19:10:56 wollman Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -291,7 +291,7 @@ parse(string, flags)
|
|||
getloadavg(loads, 3);
|
||||
if (!nflag)
|
||||
fprintf(stdout, "%s: ", string);
|
||||
fprintf(stdout, "%.2f %.2f %.2f\n",
|
||||
fprintf(stdout, "%.2f %.2f %.2f\n",
|
||||
loads[0], loads[1], loads[2]);
|
||||
return;
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ parse(string, flags)
|
|||
default:
|
||||
fprintf(stderr, "Illegal top level value: %d\n", mib[0]);
|
||||
return;
|
||||
|
||||
|
||||
}
|
||||
if (bufp) {
|
||||
fprintf(stderr, "name %s in %s is unknown\n", *bufp, string);
|
||||
|
@ -404,7 +404,7 @@ parse(string, flags)
|
|||
}
|
||||
if (!nflag)
|
||||
fprintf(stdout, "%s = %s\n", string,
|
||||
devname(dev,
|
||||
devname(dev,
|
||||
(special & CONSDEV) ? S_IFCHR : S_IFBLK));
|
||||
else
|
||||
fprintf(stdout, "0x%x\n", dev);
|
||||
|
|
|
@ -21,23 +21,23 @@ SUBDIR= ac accton adduser amd arp bootparamd chown chroot cron crunch ctm \
|
|||
.if make(clean) || make(cleandir)
|
||||
SUBDIR+=apm apmconf bad144 cdplay config config.new fdformat fdwrite \
|
||||
fdcontrol iostat kbdcontrol lptcontrol mixer ncrcontrol rtprio \
|
||||
sgsc spkrtest vidcontrol
|
||||
sgsc spkrtest vidcontrol
|
||||
.elif ${MACHINE} == "hp300"
|
||||
SUBDIR+=config iostat
|
||||
SUBDIR+=config iostat
|
||||
.elif ${MACHINE} == "i386"
|
||||
SUBDIR+=apm apmconf bad144 cdplay config fdformat fdwrite fdcontrol iostat \
|
||||
kbdcontrol lptcontrol mixer ncrcontrol rtprio sgsc spkrtest \
|
||||
vidcontrol
|
||||
.elif ${MACHINE} == "luna68k"
|
||||
SUBDIR+=config iostat
|
||||
SUBDIR+=config iostat
|
||||
.elif ${MACHINE} == "mips"
|
||||
SUBDIR+=config iostat
|
||||
SUBDIR+=config iostat
|
||||
.elif ${MACHINE} == "sparc"
|
||||
SUBDIR+=config.new eeprom
|
||||
SUBDIR+=config.new eeprom
|
||||
.elif ${MACHINE} == "tahoe"
|
||||
SUBDIR+=config iostat
|
||||
SUBDIR+=config iostat
|
||||
.elif ${MACHINE} == "vax"
|
||||
SUBDIR+=bad144 config iostat
|
||||
SUBDIR+=bad144 config iostat
|
||||
.endif
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
|
|
|
@ -92,7 +92,7 @@ xnnet_netmatch(sxn1, sxn2)
|
|||
xnnet_portmatch(sns)
|
||||
register struct sockaddr_ns *sns;
|
||||
{
|
||||
|
||||
|
||||
return (ntohs(sns->sns_addr.x_port) == IDPPORT_RIF );
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ xnnet_output(flags, sns, size)
|
|||
sns->sns_addr.x_port = htons(IDPPORT_RIF);
|
||||
#ifdef DEBUG
|
||||
if(do_output || ntohs(msg->rip_cmd) == RIPCMD_REQUEST)
|
||||
#endif
|
||||
#endif
|
||||
/*
|
||||
* Kludge to allow us to get routes out to machines that
|
||||
* don't know their addresses yet; send to that address on
|
||||
|
@ -125,16 +125,16 @@ xnnet_output(flags, sns, size)
|
|||
if (ns_neteqnn(sns->sns_addr.x_net, ns_zeronet)) {
|
||||
extern struct interface *ifnet;
|
||||
register struct interface *ifp;
|
||||
|
||||
|
||||
for (ifp = ifnet; ifp; ifp = ifp->int_next) {
|
||||
sns->sns_addr.x_net =
|
||||
sns->sns_addr.x_net =
|
||||
satons_addr(ifp->int_addr).x_net;
|
||||
(void) sendto(s, msg, size, flags,
|
||||
(struct sockaddr *)sns, sizeof (*sns));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
(void) sendto(s, msg, size, flags,
|
||||
(struct sockaddr *)sns, sizeof (*sns));
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ xnnet_checkhost(sns)
|
|||
{
|
||||
register struct interface *ifp = if_ifwithnet(sns);
|
||||
/*
|
||||
* We want this route if there is no more than one
|
||||
* We want this route if there is no more than one
|
||||
* point to point interface with this network.
|
||||
*/
|
||||
if (ifp == 0 || (ifp->int_flags & IFF_POINTOPOINT)==0) return (1);
|
||||
|
|
|
@ -88,7 +88,7 @@ if_ifwithdstaddr(addr)
|
|||
}
|
||||
|
||||
/*
|
||||
* Find the interface on the network
|
||||
* Find the interface on the network
|
||||
* of the specified address.
|
||||
*/
|
||||
struct interface *
|
||||
|
|
|
@ -49,14 +49,14 @@ union ns_net net;
|
|||
{
|
||||
static struct sockaddr_ns sxn;
|
||||
extern char ether_broadcast_addr[6];
|
||||
|
||||
|
||||
bzero(&sxn, sizeof (struct sockaddr_ns));
|
||||
sxn.sns_family = AF_NS;
|
||||
sxn.sns_len = sizeof (sxn);
|
||||
sxn.sns_addr.x_net = net;
|
||||
sxn.sns_addr.x_host = *(union ns_host *)ether_broadcast_addr;
|
||||
return( (struct sockaddr *)&sxn);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -72,13 +72,13 @@ rip_input(from, size)
|
|||
int newsize;
|
||||
struct afswitch *afp;
|
||||
|
||||
|
||||
|
||||
ifp = 0;
|
||||
TRACE_INPUT(ifp, from, size);
|
||||
if (from->sa_family >= AF_MAX)
|
||||
return;
|
||||
afp = &afswitch[from->sa_family];
|
||||
|
||||
|
||||
size -= sizeof (u_short) /* command */;
|
||||
n = msg->rip_nets;
|
||||
|
||||
|
@ -91,7 +91,7 @@ rip_input(from, size)
|
|||
break;
|
||||
size -= sizeof (struct netinfo);
|
||||
|
||||
/*
|
||||
/*
|
||||
* A single entry with rip_dst == DSTNETS_ALL and
|
||||
* metric ``infinity'' means ``all routes''.
|
||||
*/
|
||||
|
|
|
@ -60,7 +60,7 @@ static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/5/93";
|
|||
int supplier = -1; /* process should supply updates */
|
||||
extern int gateway;
|
||||
|
||||
struct rip *msg = (struct rip *) &packet[sizeof (struct idp)];
|
||||
struct rip *msg = (struct rip *) &packet[sizeof (struct idp)];
|
||||
void hup(), fkexit(), timer();
|
||||
|
||||
main(argc, argv)
|
||||
|
@ -70,7 +70,7 @@ main(argc, argv)
|
|||
int cc;
|
||||
struct sockaddr from;
|
||||
u_char retry;
|
||||
|
||||
|
||||
argv0 = argv;
|
||||
argv++, argc--;
|
||||
while (argc > 0 && **argv == '-') {
|
||||
|
@ -93,7 +93,7 @@ main(argc, argv)
|
|||
tracepackets++;
|
||||
argv++, argc--;
|
||||
ftrace = stderr;
|
||||
tracing = 1;
|
||||
tracing = 1;
|
||||
continue;
|
||||
}
|
||||
if (strcmp(*argv, "-g") == 0) {
|
||||
|
@ -110,8 +110,8 @@ main(argc, argv)
|
|||
"usage: xnsrouted [ -s ] [ -q ] [ -t ] [ -g ] [ -l ]\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef DEBUG
|
||||
if (!tracepackets)
|
||||
daemon(0, 0);
|
||||
|
@ -161,11 +161,11 @@ main(argc, argv)
|
|||
signal(SIGINT, hup);
|
||||
signal(SIGEMT, fkexit);
|
||||
timer();
|
||||
|
||||
|
||||
for (;;)
|
||||
|
||||
for (;;)
|
||||
process(s);
|
||||
|
||||
|
||||
}
|
||||
|
||||
process(fd)
|
||||
|
@ -185,7 +185,7 @@ process(fd)
|
|||
fprintf(ftrace,"rcv %d bytes on %s ", cc, xns_ntoa(&idp->idp_dna));
|
||||
fprintf(ftrace," from %s\n", xns_ntoa(&idp->idp_sna));
|
||||
}
|
||||
|
||||
|
||||
if (noteremoterequests && !ns_neteqnn(idp->idp_sna.x_net, ns_zeronet)
|
||||
&& !ns_neteq(idp->idp_sna, idp->idp_dna))
|
||||
{
|
||||
|
@ -194,7 +194,7 @@ process(fd)
|
|||
xns_nettoa(idp->idp_dna.x_net),
|
||||
xns_nettoa(idp->idp_sna.x_net));
|
||||
}
|
||||
|
||||
|
||||
/* We get the IDP header in front of the RIF packet*/
|
||||
cc -= sizeof (struct idp);
|
||||
#define mask(s) (1<<((s)-1))
|
||||
|
@ -204,7 +204,7 @@ process(fd)
|
|||
}
|
||||
|
||||
getsocket(type, proto, sns)
|
||||
int type, proto;
|
||||
int type, proto;
|
||||
struct sockaddr_ns *sns;
|
||||
{
|
||||
int domain = sns->sns_family;
|
||||
|
|
|
@ -50,7 +50,7 @@ struct rip {
|
|||
u_short rip_cmd; /* request/response */
|
||||
struct netinfo rip_nets[1]; /* variable length */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Packet types.
|
||||
*/
|
||||
|
|
|
@ -180,10 +180,10 @@ ifinit()
|
|||
}
|
||||
ifs.int_dstaddr = *brdaddr;
|
||||
}
|
||||
/*
|
||||
* already known to us?
|
||||
/*
|
||||
* already known to us?
|
||||
* what makes a POINTOPOINT if unique is its dst addr,
|
||||
* NOT its source address
|
||||
* NOT its source address
|
||||
*/
|
||||
if ( ((ifs.int_flags & IFF_POINTOPOINT) &&
|
||||
if_ifwithdstaddr(&ifs.int_dstaddr)) ||
|
||||
|
@ -243,7 +243,7 @@ addrouteforif(ifp)
|
|||
int (*match)();
|
||||
register struct interface *ifp2 = ifnet;
|
||||
register struct interface *ifprev = ifnet;
|
||||
|
||||
|
||||
dst = &ifp->int_dstaddr;
|
||||
|
||||
/* Search for interfaces with the same net */
|
||||
|
|
|
@ -67,7 +67,7 @@ timer()
|
|||
for (; rt != (struct rt_entry *)rh; rt = rt->rt_forw) {
|
||||
/*
|
||||
* We don't advance time on a routing entry for
|
||||
* a passive gateway or that for our only interface.
|
||||
* a passive gateway or that for our only interface.
|
||||
* The latter is excused because we don't act as
|
||||
* a routing information supplier and hence would
|
||||
* time it out. This is fair as if it's down
|
||||
|
|
|
@ -74,7 +74,7 @@ char *argv[];
|
|||
struct sockaddr from;
|
||||
int fromlen = sizeof(from);
|
||||
struct timeval notime;
|
||||
|
||||
|
||||
if (argc < 2) {
|
||||
printf("usage: query hosts...\n");
|
||||
exit(1);
|
||||
|
@ -96,7 +96,7 @@ char *argv[];
|
|||
bzero(¬ime, sizeof(notime));
|
||||
signal(SIGALRM, timeout);
|
||||
alarm(WTIME);
|
||||
while (!timedout ||
|
||||
while (!timedout ||
|
||||
select(20, &bits, 0, 0, ¬ime) > 0) {
|
||||
struct nspacket {
|
||||
struct idp hdr;
|
||||
|
@ -191,7 +191,7 @@ timeout()
|
|||
timedout = 1;
|
||||
}
|
||||
getsocket(type, proto)
|
||||
int type, proto;
|
||||
int type, proto;
|
||||
{
|
||||
struct sockaddr_ns *sns = &myaddr;
|
||||
int domain = sns->sns_family;
|
||||
|
|
|
@ -305,9 +305,9 @@ struct ns_addr *addr;
|
|||
|
||||
(void)sprintf(buf, "%s#%x:%x:%x:%x:%x:%x",
|
||||
xns_nettoa(addr->x_net),
|
||||
addr->x_host.c_host[0], addr->x_host.c_host[1],
|
||||
addr->x_host.c_host[2], addr->x_host.c_host[3],
|
||||
addr->x_host.c_host[0], addr->x_host.c_host[1],
|
||||
addr->x_host.c_host[2], addr->x_host.c_host[3],
|
||||
addr->x_host.c_host[4], addr->x_host.c_host[5]);
|
||||
|
||||
|
||||
return(buf);
|
||||
}
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/*
|
||||
* Copyright (c) 1994 Christopher G. Demetriou.
|
||||
* @(#)Copyright (c) 1994, Simon J. Gerraty.
|
||||
*
|
||||
*
|
||||
* This is free software. It comes with NO WARRANTY.
|
||||
* Permission to use, modify and distribute this source code
|
||||
* Permission to use, modify and distribute this source code
|
||||
* is granted subject to the following conditions.
|
||||
* 1/ that the above copyright notice and this notice
|
||||
* are preserved in all copies and that due credit be given
|
||||
* to the author.
|
||||
* 2/ that any changes to this code are clearly commented
|
||||
* as such so that the author does not get blamed for bugs
|
||||
* 1/ that the above copyright notice and this notice
|
||||
* are preserved in all copies and that due credit be given
|
||||
* to the author.
|
||||
* 2/ that any changes to this code are clearly commented
|
||||
* as such so that the author does not get blamed for bugs
|
||||
* other than his own.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$Id: ac.c,v 1.1 1994/09/26 22:12:27 davidg Exp $";
|
||||
static char rcsid[] = "$Id: ac.c,v 1.2 1994/11/14 20:26:52 ache Exp $";
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -120,7 +120,7 @@ add_tty(name)
|
|||
register char *rcp;
|
||||
|
||||
Flags |= AC_T;
|
||||
|
||||
|
||||
if ((tp = NEW(struct tty_list)) == NULL)
|
||||
err(1, "malloc");
|
||||
tp->len = 0; /* full match */
|
||||
|
@ -149,7 +149,7 @@ do_tty(name)
|
|||
{
|
||||
struct tty_list *tp;
|
||||
int def_ret = 0;
|
||||
|
||||
|
||||
for (tp = Ttys; tp != NULL; tp = tp->next) {
|
||||
if (tp->ret == 0) /* specific don't */
|
||||
def_ret = 1; /* default do */
|
||||
|
@ -206,7 +206,7 @@ update_user(head, name, secs)
|
|||
*/
|
||||
if (Flags & AC_U)
|
||||
return head;
|
||||
|
||||
|
||||
if ((up = NEW(struct user_list)) == NULL)
|
||||
err(1, "malloc");
|
||||
up->next = head;
|
||||
|
@ -275,11 +275,11 @@ main(argc, argv)
|
|||
*/
|
||||
if (access(_PATH_WTMP, 0) != 0 && errno == ENOENT)
|
||||
return 0;
|
||||
|
||||
|
||||
fp = file(_PATH_WTMP);
|
||||
}
|
||||
ac(fp);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ show_today(users, logins, secs)
|
|||
|
||||
/* restore the missing second */
|
||||
yesterday++;
|
||||
|
||||
|
||||
for (lp = logins; lp != NULL; lp = lp->next) {
|
||||
secs = yesterday - lp->usr.ut_time;
|
||||
Users = update_user(Users, lp->usr.ut_name, secs);
|
||||
|
@ -351,7 +351,7 @@ log_out(head, up)
|
|||
{
|
||||
struct utmp_list *lp, *lp2, *tlp;
|
||||
time_t secs;
|
||||
|
||||
|
||||
for (lp = head, lp2 = NULL; lp != NULL; )
|
||||
if (*up->ut_line == '~' || strncmp(lp->usr.ut_line, up->ut_line,
|
||||
sizeof (up->ut_line)) == 0) {
|
||||
|
@ -408,13 +408,13 @@ log_in(head, up)
|
|||
if (up->ut_host[0] == ':') {
|
||||
/*
|
||||
* SunOS 4.0.2 does not treat ":0.0" as special but we
|
||||
* do.
|
||||
* do.
|
||||
*/
|
||||
if (on_console(head))
|
||||
return head;
|
||||
/*
|
||||
* ok, no recorded login, so they were here when wtmp
|
||||
* started! Adjust ut_time!
|
||||
* started! Adjust ut_time!
|
||||
*/
|
||||
up->ut_time = FirstTime;
|
||||
/*
|
||||
|
@ -462,7 +462,7 @@ ac(fp)
|
|||
struct tm *ltm;
|
||||
time_t secs;
|
||||
int day = -1;
|
||||
|
||||
|
||||
while (fread((char *)&usr, sizeof(usr), 1, fp) == 1) {
|
||||
if (!FirstTime)
|
||||
FirstTime = usr.ut_time;
|
||||
|
@ -515,7 +515,7 @@ ac(fp)
|
|||
(void)fclose(fp);
|
||||
usr.ut_time = time((time_t *)0);
|
||||
(void)strcpy(usr.ut_line, "~");
|
||||
|
||||
|
||||
if (Flags & AC_D) {
|
||||
ltm = localtime(&usr.ut_time);
|
||||
if (day >= 0 && day != ltm->tm_yday) {
|
||||
|
|
|
@ -67,7 +67,7 @@ main(argc, argv)
|
|||
argv += optind;
|
||||
|
||||
switch(argc) {
|
||||
case 0:
|
||||
case 0:
|
||||
if (acct(NULL)) {
|
||||
(void)fprintf(stderr,
|
||||
"accton: %s\n", strerror(errno));
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)afs_ops.c 8.1 (Berkeley) 6/6/93
|
||||
*
|
||||
* $Id: afs_ops.c,v 5.2.2.4 1992/05/31 16:36:36 jsp Exp $
|
||||
* $Id: afs_ops.c,v 1.1.1.1 1994/05/26 05:22:03 rgrimes Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -136,7 +136,7 @@ char *opts;
|
|||
/*
|
||||
* get fhandle of remote path for automount point
|
||||
*/
|
||||
|
||||
|
||||
fhp = root_fh(dir);
|
||||
if (!fhp) {
|
||||
plog(XLOG_FATAL, "Can't find root file handle for %s", dir);
|
||||
|
@ -420,7 +420,7 @@ static void union_mounted(mf)
|
|||
mntfs *mf;
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
afs_mkcacheref(mf);
|
||||
|
||||
/*
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)host_ops.c 8.1 (Berkeley) 6/6/93
|
||||
*
|
||||
* $Id: host_ops.c,v 5.2.2.2 1992/05/31 16:36:08 jsp Exp $
|
||||
* $Id: host_ops.c,v 1.1.1.1 1994/05/26 05:22:00 rgrimes Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -98,7 +98,7 @@ am_opts *fo;
|
|||
if (!fo->opt_rfs)
|
||||
fo->opt_rfs = "/";
|
||||
|
||||
|
||||
|
||||
return (*nfs_ops.fs_match)(fo);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)info_hes.c 8.1 (Berkeley) 6/6/93
|
||||
*
|
||||
* $Id: info_hes.c,v 5.2.2.1 1992/02/09 15:08:29 jsp beta $
|
||||
* $Id: info_hes.c,v 1.1.1.1 1994/05/26 05:22:01 rgrimes Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -293,7 +293,7 @@ int anslen;
|
|||
sizeof(struct in_addr));
|
||||
server.sin_family = AF_INET;
|
||||
server.sin_port = htons(NAMESERVER_PORT);
|
||||
|
||||
|
||||
if (connect(s, &server,
|
||||
sizeof(struct sockaddr)) < 0) {
|
||||
(void) close(s);
|
||||
|
@ -482,7 +482,7 @@ char *name;
|
|||
{
|
||||
char *end_pos;
|
||||
short targ_len, cur_len;
|
||||
|
||||
|
||||
targ_len = strlen(hs_domain);
|
||||
cur_len = strlen(name);
|
||||
if (cur_len <= targ_len)
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)info_passwd.c 8.1 (Berkeley) 6/6/93
|
||||
*
|
||||
* $Id: info_passwd.c,v 5.2.2.1 1992/02/09 15:08:33 jsp beta $
|
||||
* $Id: info_passwd.c,v 1.1.1.1 1994/05/26 05:22:01 rgrimes Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -113,7 +113,7 @@ time_t *tp;
|
|||
*user++ = '\0';
|
||||
/*
|
||||
* Find start of host "path". If no / then Invalid...
|
||||
*/
|
||||
*/
|
||||
p = strchr(dir+1, '/');
|
||||
if (!p)
|
||||
goto enoent;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: map.c,v 5.2.2.1 1992/02/09 15:08:36 jsp beta $
|
||||
* $Id: map.c,v 1.1.1.1 1994/05/26 05:22:00 rgrimes Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
|
@ -122,7 +122,7 @@ int nsize;
|
|||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* The root of the mount tree.
|
||||
*/
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mapc.c,v 5.2.2.1 1992/02/09 15:08:38 jsp beta $
|
||||
* $Id: mapc.c,v 1.1.1.1 1994/05/26 05:22:01 rgrimes Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
|
@ -164,7 +164,7 @@ qelem map_list_head = { &map_list_head, &map_list_head };
|
|||
/*
|
||||
* Configuration
|
||||
*/
|
||||
|
||||
|
||||
/* ROOT MAP */
|
||||
static int root_init P((char*, time_t*));
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)misc_rpc.c 8.1 (Berkeley) 6/6/93
|
||||
*
|
||||
* $Id: misc_rpc.c,v 5.2.2.1 1992/02/09 15:08:40 jsp beta $
|
||||
* $Id: misc_rpc.c,v 1.1.1.1 1994/05/26 05:22:01 rgrimes Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -172,23 +172,23 @@ AUTH *auth;
|
|||
* may copy or modify Sun RPC without charge, but are not authorized
|
||||
* to license or distribute it to anyone else except as part of a product or
|
||||
* program developed by the user.
|
||||
*
|
||||
*
|
||||
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
||||
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
*
|
||||
* Sun RPC is provided with no support and without any obligation on the
|
||||
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
|
@ -245,23 +245,23 @@ xdr_pointer(xdrs,objpp,obj_size,xdr_obj)
|
|||
* may copy or modify Sun RPC without charge, but are not authorized
|
||||
* to license or distribute it to anyone else except as part of a product or
|
||||
* program developed by the user.
|
||||
*
|
||||
*
|
||||
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
||||
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
*
|
||||
* Sun RPC is provided with no support and without any obligation on the
|
||||
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
|
@ -273,41 +273,41 @@ struct rpc_errtab {
|
|||
};
|
||||
|
||||
static struct rpc_errtab rpc_errlist[] = {
|
||||
{ RPC_SUCCESS,
|
||||
"RPC: Success" },
|
||||
{ RPC_CANTENCODEARGS,
|
||||
{ RPC_SUCCESS,
|
||||
"RPC: Success" },
|
||||
{ RPC_CANTENCODEARGS,
|
||||
"RPC: Can't encode arguments" },
|
||||
{ RPC_CANTDECODERES,
|
||||
{ RPC_CANTDECODERES,
|
||||
"RPC: Can't decode result" },
|
||||
{ RPC_CANTSEND,
|
||||
{ RPC_CANTSEND,
|
||||
"RPC: Unable to send" },
|
||||
{ RPC_CANTRECV,
|
||||
{ RPC_CANTRECV,
|
||||
"RPC: Unable to receive" },
|
||||
{ RPC_TIMEDOUT,
|
||||
{ RPC_TIMEDOUT,
|
||||
"RPC: Timed out" },
|
||||
{ RPC_VERSMISMATCH,
|
||||
{ RPC_VERSMISMATCH,
|
||||
"RPC: Incompatible versions of RPC" },
|
||||
{ RPC_AUTHERROR,
|
||||
{ RPC_AUTHERROR,
|
||||
"RPC: Authentication error" },
|
||||
{ RPC_PROGUNAVAIL,
|
||||
{ RPC_PROGUNAVAIL,
|
||||
"RPC: Program unavailable" },
|
||||
{ RPC_PROGVERSMISMATCH,
|
||||
{ RPC_PROGVERSMISMATCH,
|
||||
"RPC: Program/version mismatch" },
|
||||
{ RPC_PROCUNAVAIL,
|
||||
{ RPC_PROCUNAVAIL,
|
||||
"RPC: Procedure unavailable" },
|
||||
{ RPC_CANTDECODEARGS,
|
||||
{ RPC_CANTDECODEARGS,
|
||||
"RPC: Server can't decode arguments" },
|
||||
{ RPC_SYSTEMERROR,
|
||||
{ RPC_SYSTEMERROR,
|
||||
"RPC: Remote system error" },
|
||||
{ RPC_UNKNOWNHOST,
|
||||
{ RPC_UNKNOWNHOST,
|
||||
"RPC: Unknown host" },
|
||||
/* { RPC_UNKNOWNPROTO,
|
||||
"RPC: Unknown protocol" },*/
|
||||
{ RPC_PMAPFAILURE,
|
||||
{ RPC_PMAPFAILURE,
|
||||
"RPC: Port mapper failure" },
|
||||
{ RPC_PROGNOTREGISTERED,
|
||||
{ RPC_PROGNOTREGISTERED,
|
||||
"RPC: Program not registered"},
|
||||
{ RPC_FAILED,
|
||||
{ RPC_FAILED,
|
||||
"RPC: Failed (unspecified error)"}
|
||||
};
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: nfs_ops.c,v 1.1.1.1 1994/05/26 05:22:02 rgrimes Exp $
|
||||
* $Id: nfs_ops.c,v 1.2 1995/02/13 01:56:22 wpaul Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
|
@ -448,7 +448,7 @@ mntfs *mf;
|
|||
if (!mf->mf_private) {
|
||||
int error;
|
||||
struct fhstatus fhs;
|
||||
|
||||
|
||||
char *colon = strchr(mf->mf_info, ':');
|
||||
if (colon == 0)
|
||||
return ENOENT;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)nfs_start.c 8.1 (Berkeley) 6/6/93
|
||||
*
|
||||
* $Id: nfs_start.c,v 5.2.2.1 1992/02/09 15:08:51 jsp beta $
|
||||
* $Id: nfs_start.c,v 1.1.1.1 1994/05/26 05:22:00 rgrimes Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -282,7 +282,7 @@ static serv_state run_rpc(P_void)
|
|||
if (readfds & (1 << fwd_sock)) {
|
||||
readfds &= ~(1 << fwd_sock);
|
||||
#endif
|
||||
--nsel;
|
||||
--nsel;
|
||||
do {
|
||||
fwd_reply();
|
||||
} while (rpc_pending_now() > 0);
|
||||
|
@ -345,7 +345,7 @@ int ppid;
|
|||
return 1;
|
||||
}
|
||||
|
||||
if ((nfsxprt = svcudp_create(so)) == NULL ||
|
||||
if ((nfsxprt = svcudp_create(so)) == NULL ||
|
||||
(amqp = svcudp_create(so)) == NULL) {
|
||||
plog(XLOG_FATAL, "cannot create rpc/udp service");
|
||||
return 2;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)nfs_subr.c 8.1 (Berkeley) 6/6/93
|
||||
*
|
||||
* $Id: nfs_subr.c,v 5.2.2.1 1992/02/09 15:08:53 jsp beta $
|
||||
* $Id: nfs_subr.c,v 1.1.1.1 1994/05/26 05:22:00 rgrimes Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -88,7 +88,7 @@ struct attrstat **attrpp;
|
|||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
voidp
|
||||
voidp
|
||||
nfsproc_null_2(argp, rqstp)
|
||||
voidp argp;
|
||||
struct svc_req *rqstp;
|
||||
|
@ -166,7 +166,7 @@ struct svc_req *rqstp;
|
|||
|
||||
|
||||
/*ARGSUSED*/
|
||||
voidp
|
||||
voidp
|
||||
nfsproc_root_2(argp, rqstp)
|
||||
voidp argp;
|
||||
struct svc_req *rqstp;
|
||||
|
@ -283,7 +283,7 @@ struct svc_req *rqstp;
|
|||
|
||||
|
||||
/*ARGSUSED*/
|
||||
voidp
|
||||
voidp
|
||||
nfsproc_writecache_2(argp, rqstp)
|
||||
voidp argp;
|
||||
struct svc_req *rqstp;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: restart.c,v 5.2.2.1 1992/02/09 15:08:59 jsp beta $
|
||||
* $Id: restart.c,v 1.1.1.1 1994/05/26 05:22:02 rgrimes Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -122,7 +122,7 @@ void restart()
|
|||
mo.opt_rfs = strdup(cp+1);
|
||||
*cp = ':';
|
||||
} else if (fs_ops->ffserver == find_nfs_srvr) {
|
||||
/*
|
||||
/*
|
||||
* Prototype 4.4 BSD used to end up here -
|
||||
* might as well keep the workaround for now
|
||||
*/
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)rpc_fwd.c 8.1 (Berkeley) 6/6/93
|
||||
*
|
||||
* $Id: rpc_fwd.c,v 5.2.2.1 1992/02/09 15:09:01 jsp beta $
|
||||
* $Id: rpc_fwd.c,v 1.1.1.1 1994/05/26 05:22:02 rgrimes Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -136,7 +136,7 @@ static rpc_forward *fwd_alloc()
|
|||
|
||||
/*
|
||||
* Set the time to live field
|
||||
* Timeout in 43 seconds
|
||||
* Timeout in 43 seconds
|
||||
*/
|
||||
p->rf_ttl = now + 43;
|
||||
|
||||
|
@ -293,7 +293,7 @@ fwd_fun cb;
|
|||
* rest of "p" otherwise nasty things happen later...
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
{ char dq[20];
|
||||
{ char dq[20];
|
||||
dlog("Sending packet id %#x to %s.%d", p->rf_xid, inet_dquad(dq, fwdto->sin_addr.s_addr), ntohs(fwdto->sin_port));
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)srvr_nfs.c 8.1 (Berkeley) 6/6/93
|
||||
*
|
||||
* $Id: srvr_nfs.c,v 5.2.2.1 1992/02/09 15:09:06 jsp beta $
|
||||
* $Id: srvr_nfs.c,v 1.1.1.1 1994/05/26 05:22:02 rgrimes Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -245,7 +245,7 @@ static void nfs_keepalive P((fserver*));
|
|||
static void recompute_portmap P((fserver *fs));
|
||||
static void recompute_portmap(fs)
|
||||
fserver *fs;
|
||||
{
|
||||
{
|
||||
int error;
|
||||
|
||||
if (nfs_auth)
|
||||
|
@ -357,7 +357,7 @@ int done;
|
|||
if (np->np_mountd_inval)
|
||||
recompute_portmap(fs);
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG
|
||||
found_map++;
|
||||
#endif /* DEBUG */
|
||||
break;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)umount_fs.c 8.1 (Berkeley) 6/6/93
|
||||
*
|
||||
* $Id: umount_fs.c,v 5.2.2.1 1992/02/09 15:09:10 jsp beta $
|
||||
* $Id: umount_fs.c,v 1.1.1.1 1994/05/26 05:22:03 rgrimes Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -189,7 +189,7 @@ char *fs_name;
|
|||
if (!error) {
|
||||
free_mntlist(mlist);
|
||||
mp = mlist = read_mtab(fs_name);
|
||||
|
||||
|
||||
/*
|
||||
* Search the mount table looking for
|
||||
* the correct (ie last) matching entry
|
||||
|
@ -201,7 +201,7 @@ char *fs_name;
|
|||
mp_save = mp;
|
||||
mp = mp->mnext;
|
||||
}
|
||||
|
||||
|
||||
if (mp_save) {
|
||||
mnt_free(mp_save->mnt);
|
||||
mp_save->mnt = 0;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)wire.c 8.1 (Berkeley) 6/6/93
|
||||
*
|
||||
* $Id: wire.c,v 5.2.2.1 1992/02/09 15:09:15 jsp beta $
|
||||
* $Id: wire.c,v 1.1.1.1 1994/05/26 05:22:03 rgrimes Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -185,9 +185,9 @@ char *getwire()
|
|||
* Figure out the subnet's network address
|
||||
*/
|
||||
subnet = address & netmask;
|
||||
|
||||
|
||||
#ifdef IN_CLASSA
|
||||
subnet = ntohl(subnet);
|
||||
subnet = ntohl(subnet);
|
||||
|
||||
if (IN_CLASSA(subnet)) {
|
||||
mask = IN_CLASSA_NET;
|
||||
|
@ -243,7 +243,7 @@ char *getwire()
|
|||
|
||||
out:
|
||||
if (sk >= 0)
|
||||
(void) close(sk);
|
||||
(void) close(sk);
|
||||
if (netname)
|
||||
return netname;
|
||||
return strdup(NO_SUBNET);
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)amq.c 8.1 (Berkeley) 6/7/93
|
||||
*
|
||||
* $Id: amq.c,v 5.2.2.1 1992/02/09 15:09:16 jsp beta $
|
||||
* $Id: amq.c,v 1.1.1.1 1994/05/26 05:22:04 rgrimes Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -54,7 +54,7 @@ char copyright[] = "\
|
|||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$Id: amq.c,v 5.2.2.1 1992/02/09 15:09:16 jsp beta $";
|
||||
static char rcsid[] = "$Id: amq.c,v 1.1.1.1 1994/05/26 05:22:04 rgrimes Exp $";
|
||||
static char sccsid[] = "@(#)amq.c 8.1 (Berkeley) 6/7/93";
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -115,7 +115,7 @@ printf("%-*.*s %-*.*s %-*.*s %s\n\t%-5d %-7d %-6d %-7d %-7d %-6d %02d/%02d/%02d
|
|||
*mt->mt_directory ? mt->mt_directory : "/", /* XXX */
|
||||
*twid, *twid,
|
||||
mt->mt_type,
|
||||
*mwid, *mwid,
|
||||
*mwid, *mwid,
|
||||
mt->mt_mountinfo,
|
||||
mt->mt_mountpoint,
|
||||
|
||||
|
@ -370,7 +370,7 @@ char *argv[];
|
|||
if (unmount_flag)
|
||||
errs = 1;
|
||||
}
|
||||
|
||||
|
||||
if (errs) {
|
||||
show_usage:
|
||||
fprintf(stderr, "\
|
||||
|
@ -607,7 +607,7 @@ Usage: %s [-h host] [[-f] [-m] [-v] [-s]] | [[-u] directory ...]] |\n\
|
|||
}
|
||||
|
||||
/*
|
||||
* udpresport creates a datagram socket and attempts to bind it to a
|
||||
* udpresport creates a datagram socket and attempts to bind it to a
|
||||
* secure port.
|
||||
* returns: The bound socket, or -1 to indicate an error.
|
||||
*/
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
# @(#)Makefile.irix3 8.1 (Berkeley) 6/6/93
|
||||
#
|
||||
# $Id: Makefile.irix3,v 5.2 1992/05/31 16:40:22 jsp Exp $
|
||||
# $Id: Makefile.irix3,v 1.1.1.1 1994/05/26 05:22:09 rgrimes Exp $
|
||||
#
|
||||
# Extra Makefile definitions for IRIX
|
||||
#
|
||||
|
||||
# For 3.3.x and earlier we might need to indicate the Sun and BSD include
|
||||
# paths.
|
||||
|
||||
|
||||
DEBUG = #-g -DDEBUG
|
||||
CCOPTS = -I/usr/include/sun -I/usr/include/bsd
|
||||
RESOLV = -lrpcsvc -lsun -lbsd
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)mtab_file.c 8.1 (Berkeley) 6/6/93
|
||||
*
|
||||
* $Id: mtab_file.c,v 5.2.2.1 1992/02/09 15:10:42 jsp beta $
|
||||
* $Id: mtab_file.c,v 1.1.1.1 1994/05/26 05:22:07 rgrimes Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -71,7 +71,7 @@ static FILE *mnt_file;
|
|||
* opening mtab may fail with ENFILE. So, go to sleep
|
||||
* for a second and try again. (Yes - this has happened to me.)
|
||||
*
|
||||
* Note that this *may* block the automounter, oh well.
|
||||
* Note that this *may* block the automounter, oh well.
|
||||
* If we get to this state then things are badly wrong anyway...
|
||||
*
|
||||
* Give the system 10 seconds to recover but then give up.
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)os-convex.h 8.1 (Berkeley) 6/6/93
|
||||
*
|
||||
* $Id: os-convex.h,v 5.2.2.1 1992/02/09 15:10:16 jsp beta $
|
||||
* $Id: os-convex.h,v 1.1.1.1 1994/05/26 05:22:07 rgrimes Exp $
|
||||
*
|
||||
* Convex C220, version 7.1 definitions for Amd (automounter)
|
||||
* from Eitan Mizrotsky <eitan@shum.huji.ac.il>
|
||||
|
@ -48,33 +48,33 @@
|
|||
* Does the compiler grok void *
|
||||
*/
|
||||
#undef VOIDP
|
||||
|
||||
|
||||
/*
|
||||
* Which version of the Sun RPC library we are using
|
||||
* This is the implementation release number, not
|
||||
* the protocol revision number.
|
||||
*/
|
||||
#define RPC_3
|
||||
|
||||
|
||||
/*
|
||||
* Which version of the NFS interface are we using.
|
||||
* This is the implementation release number, not
|
||||
* the protocol revision number.
|
||||
*/
|
||||
#define NFS_3
|
||||
|
||||
|
||||
/*
|
||||
* Byte ordering
|
||||
*/
|
||||
#undef ARCH_ENDIAN
|
||||
#define ARCH_ENDIAN "big"
|
||||
|
||||
|
||||
/*
|
||||
* Name of filesystem types
|
||||
*/
|
||||
#define MOUNT_TYPE_UFS MOUNT_UFS
|
||||
#define MOUNT_TYPE_NFS MOUNT_NFS
|
||||
|
||||
|
||||
|
||||
|
||||
#define strrchr rindex
|
||||
#define strchr index
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)os-irix4.h 8.1 (Berkeley) 6/6/93
|
||||
*
|
||||
* $Id: os-irix4.h,v 5.2 1992/05/31 16:40:22 jsp Exp $
|
||||
* $Id: os-irix4.h,v 1.1.1.1 1994/05/26 05:22:10 rgrimes Exp $
|
||||
*
|
||||
* IRIX 4.0.X definitions for Amd (automounter)
|
||||
* Contributed by Scott R. Presnell <srp@cgl.ucsf.edu>
|
||||
|
@ -144,7 +144,7 @@
|
|||
/*
|
||||
* Under Irix, mount type "auto" is probed by statfs() in df. A statfs() of
|
||||
* a direct mount causes that mount to fire. So change the mount type in
|
||||
* /etc/mtab to "ignore" to stop that (this is what SGI does for their
|
||||
* /etc/mtab to "ignore" to stop that (this is what SGI does for their
|
||||
* automounter. Use the old FASCIST define for this.
|
||||
*/
|
||||
#define FASCIST_DF_COMMAND MNTTYPE_IGNORE
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)fsi_data.h 8.1 (Berkeley) 6/6/93
|
||||
*
|
||||
* $Id: fsi_data.h,v 5.2.2.1 1992/02/09 15:09:53 jsp beta $
|
||||
* $Id: fsi_data.h,v 1.1.1.1 1994/05/26 05:22:18 rgrimes Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -84,7 +84,7 @@ struct auto_tree {
|
|||
char *t_defaults;
|
||||
qelem *t_mount;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* A host
|
||||
*/
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)fsi_dict.c 8.1 (Berkeley) 6/6/93
|
||||
*
|
||||
* $Id: fsi_dict.c,v 5.2.2.1 1992/02/09 15:09:43 jsp beta $
|
||||
* $Id: fsi_dict.c,v 1.1.1.1 1994/05/26 05:22:17 rgrimes Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -51,7 +51,7 @@ static int dict_hash(k)
|
|||
char *k;
|
||||
{
|
||||
unsigned int h;
|
||||
|
||||
|
||||
for (h = 0; *k; h += *k++)
|
||||
;
|
||||
return h % DICTHASH;
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
*
|
||||
* @(#)fsi_util.c 8.1 (Berkeley) 6/6/93
|
||||
*
|
||||
* $Id: fsi_util.c,v 5.2.2.1 1992/02/09 15:09:39 jsp beta $
|
||||
* $Id: fsi_util.c,v 1.1.1.1 1994/05/26 05:22:18 rgrimes Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -72,7 +72,7 @@ char *s, *s1, *s2, *s3, *s4;
|
|||
fprintf(stderr, "%s:%d: ", l->i_file, l->i_line);
|
||||
fprintf(stderr, s, s1, s2, s3, s4);
|
||||
fputc('\n', stderr);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void fatal(s, s1, s2, s3, s4)
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)wr_atab.c 8.1 (Berkeley) 6/6/93
|
||||
*
|
||||
* $Id: wr_atab.c,v 5.2.2.1 1992/02/09 15:09:44 jsp beta $
|
||||
* $Id: wr_atab.c,v 1.1.1.1 1994/05/26 05:22:18 rgrimes Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -261,7 +261,7 @@ char *def;
|
|||
errors += pref_close(af);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return errors;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
*
|
||||
* This software may be used, modified, copied, distributed, and sold,
|
||||
* in both source and binary form provided that the above copyright and
|
||||
* these terms are retained. Under no circumstances is the author
|
||||
* responsible for the proper functioning of this software, nor does
|
||||
* the author assume any responsibility for damages incurred with its
|
||||
* these terms are retained. Under no circumstances is the author
|
||||
* responsible for the proper functioning of this software, nor does
|
||||
* the author assume any responsibility for damages incurred with its
|
||||
* use.
|
||||
*
|
||||
* Sep., 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
|
||||
|
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
|
|||
int i, j, fd;
|
||||
int sleep = 0, all_info = 1, batt_status = 0, batt_life = 0, ac_status = 0;
|
||||
char *cmdname;
|
||||
|
||||
|
||||
main_argc = argc;
|
||||
main_argv = argv;
|
||||
if ((cmdname = strrchr(argv[0], '/')) != NULL) {
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
*
|
||||
* This software may be used, modified, copied, distributed, and sold,
|
||||
* in both source and binary form provided that the above copyright and
|
||||
* these terms are retained. Under no circumstances is the author
|
||||
* responsible for the proper functioning of this software, nor does
|
||||
* the author assume any responsibility for damages incurred with its
|
||||
* these terms are retained. Under no circumstances is the author
|
||||
* responsible for the proper functioning of this software, nor does
|
||||
* the author assume any responsibility for damages incurred with its
|
||||
* use.
|
||||
*
|
||||
* Sep., 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
|
||||
|
@ -27,7 +27,7 @@ static int haltcpu = 0, nothaltcpu = 0;
|
|||
static int main_argc;
|
||||
static char **main_argv;
|
||||
|
||||
static void
|
||||
static void
|
||||
parse_option(void)
|
||||
{
|
||||
int i, option;
|
||||
|
@ -120,8 +120,8 @@ nothaltcpu_apm(int dh)
|
|||
exit(1);
|
||||
}
|
||||
}
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int i, dh;
|
||||
FILE *fp;
|
||||
|
|
|
@ -165,7 +165,7 @@ struct {
|
|||
} m_rtmsg;
|
||||
|
||||
/*
|
||||
* Set an individual arp entry
|
||||
* Set an individual arp entry
|
||||
*/
|
||||
set(argc, argv)
|
||||
int argc;
|
||||
|
@ -279,7 +279,7 @@ get(host)
|
|||
}
|
||||
|
||||
/*
|
||||
* Delete an arp entry
|
||||
* Delete an arp entry
|
||||
*/
|
||||
delete(host, info)
|
||||
char *host;
|
||||
|
|
|
@ -51,7 +51,7 @@ static const char sccsid[] = "@(#)bad144.c 8.1 (Berkeley) 6/6/93";
|
|||
*
|
||||
* It is preferable to write the bad information with a standard formatter,
|
||||
* but this program will do.
|
||||
*
|
||||
*
|
||||
* RP06 sectors are marked as bad by inverting the format bit in the
|
||||
* header; on other drives the valid-sector bit is cleared.
|
||||
*/
|
||||
|
@ -131,7 +131,7 @@ bad_scan(argc, argv, dp, f, bstart, bend)
|
|||
}
|
||||
|
||||
/* scan the entire disk a sector at a time. Because of all the
|
||||
* clustering in the kernel, we cannot scan a track at a time,
|
||||
* clustering in the kernel, we cannot scan a track at a time,
|
||||
* If we do, we may have to read twice over the block to find
|
||||
* exactly which one failed, and it may not fail second time.
|
||||
*/
|
||||
|
@ -162,7 +162,7 @@ bad_scan(argc, argv, dp, f, bstart, bend)
|
|||
*argv = &nargv[0];
|
||||
i = 0;
|
||||
n = ioctl(f,DIOCSBADSCAN,&i);
|
||||
if (n < 0)
|
||||
if (n < 0)
|
||||
perror("Couldn't reset disk from \"badscan\" mode");
|
||||
}
|
||||
|
||||
|
@ -238,7 +238,7 @@ main(argc, argv)
|
|||
f = open(name, !sflag && argc == 1? O_RDONLY : O_RDWR);
|
||||
if (f < 0)
|
||||
Perror(name);
|
||||
if (read(f, label, sizeof(label)) < 0)
|
||||
if (read(f, label, sizeof(label)) < 0)
|
||||
Perror("read");
|
||||
for (dp = (struct disklabel *)(label + LABELOFFSET);
|
||||
dp < (struct disklabel *)
|
||||
|
@ -408,7 +408,7 @@ main(argc, argv)
|
|||
if (nflag == 0 && (dp->d_flags & D_BADSECT) == 0) {
|
||||
dp->d_flags |= D_BADSECT;
|
||||
dp->d_checksum = 0;
|
||||
dp->d_checksum = dkcksum(dp);
|
||||
dp->d_checksum = dkcksum(dp);
|
||||
if (ioctl(f, DIOCWDINFO, dp) < 0) {
|
||||
fprintf(stderr,
|
||||
"Can't write disklabel to enable bad sector handling: %s\n",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# from: @(#)Makefile 5.8 (Berkeley) 7/28/90
|
||||
# $Id: Makefile,v 1.3 1995/03/01 20:36:17 jkh Exp $
|
||||
# $Id: Makefile,v 1.4 1995/03/02 21:59:51 wpaul Exp $
|
||||
|
||||
PROG= bootparamd
|
||||
SRCS= bootparam_prot_xdr.c bootparam_prot_svc.c bootparamd.c main.c
|
||||
|
@ -18,7 +18,7 @@ bootparam_prot_xdr.c: bootparam_prot.h
|
|||
cp ${DESTDIR}/usr/include/rpcsvc/bootparam_prot.x .
|
||||
rpcgen -c -o bootparam_prot_xdr.c bootparam_prot.x
|
||||
|
||||
bootparam_prot.h:
|
||||
bootparam_prot.h:
|
||||
rm -f bootparam_prot.x
|
||||
cp ${DESTDIR}/usr/include/rpcsvc/bootparam_prot.x .
|
||||
rpcgen -h -o bootparam_prot.h bootparam_prot.x
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/*
|
||||
|
||||
This code is not copyright, and is placed in the public domain. Feel free to
|
||||
This code is not copyright, and is placed in the public domain. Feel free to
|
||||
use and modify. Please send modifications and/or suggestions + bug fixes to
|
||||
|
||||
Klas Heggemann <klas@nada.kth.se>
|
||||
|
||||
$Id$
|
||||
$Id: bootparamd.c,v 1.1.1.1 1995/02/26 23:40:52 wpaul Exp $
|
||||
|
||||
*/
|
||||
|
||||
|
@ -31,34 +31,34 @@ static char askname[MAX_MACHINE_NAME];
|
|||
static char path[MAX_PATH_LEN];
|
||||
static char domain_name[MAX_MACHINE_NAME];
|
||||
|
||||
|
||||
|
||||
bp_whoami_res *
|
||||
bootparamproc_whoami_1(whoami)
|
||||
bp_whoami_arg *whoami;
|
||||
{
|
||||
long haddr;
|
||||
static bp_whoami_res res;
|
||||
if (debug)
|
||||
fprintf(stderr,"whoami got question for %d.%d.%d.%d\n",
|
||||
if (debug)
|
||||
fprintf(stderr,"whoami got question for %d.%d.%d.%d\n",
|
||||
255 & whoami->client_address.bp_address_u.ip_addr.net,
|
||||
255 & whoami->client_address.bp_address_u.ip_addr.host,
|
||||
255 & whoami->client_address.bp_address_u.ip_addr.lh,
|
||||
255 & whoami->client_address.bp_address_u.ip_addr.impno);
|
||||
if (dolog)
|
||||
syslog(LOG_NOTICE, "whoami got question for %d.%d.%d.%d\n",
|
||||
if (dolog)
|
||||
syslog(LOG_NOTICE, "whoami got question for %d.%d.%d.%d\n",
|
||||
255 & whoami->client_address.bp_address_u.ip_addr.net,
|
||||
255 & whoami->client_address.bp_address_u.ip_addr.host,
|
||||
255 & whoami->client_address.bp_address_u.ip_addr.lh,
|
||||
255 & whoami->client_address.bp_address_u.ip_addr.impno);
|
||||
|
||||
bcopy((char *)&whoami->client_address.bp_address_u.ip_addr, (char *)&haddr,
|
||||
bcopy((char *)&whoami->client_address.bp_address_u.ip_addr, (char *)&haddr,
|
||||
sizeof(haddr));
|
||||
he = gethostbyaddr((char *)&haddr,sizeof(haddr),AF_INET);
|
||||
if ( ! he ) goto failed;
|
||||
|
||||
if (debug) fprintf(stderr,"This is host %s\n", he->h_name);
|
||||
if (dolog) syslog(LOG_NOTICE,"This is host %s\n", he->h_name);
|
||||
|
||||
|
||||
strcpy(askname, he->h_name);
|
||||
if (checkhost(askname, hostname) ) {
|
||||
res.client_name = hostname;
|
||||
|
@ -70,7 +70,7 @@ bp_whoami_arg *whoami;
|
|||
bcopy( &route_addr, &res.router_address.bp_address_u.ip_addr, 4);
|
||||
}
|
||||
if (debug) fprintf(stderr,
|
||||
"Returning %s %s %d.%d.%d.%d\n",
|
||||
"Returning %s %s %d.%d.%d.%d\n",
|
||||
res.client_name,
|
||||
res.domain_name,
|
||||
255 & res.router_address.bp_address_u.ip_addr.net,
|
||||
|
@ -78,7 +78,7 @@ bp_whoami_arg *whoami;
|
|||
255 & res.router_address.bp_address_u.ip_addr.lh,
|
||||
255 & res.router_address.bp_address_u.ip_addr.impno);
|
||||
if (dolog) syslog(LOG_NOTICE,
|
||||
"Returning %s %s %d.%d.%d.%d\n",
|
||||
"Returning %s %s %d.%d.%d.%d\n",
|
||||
res.client_name,
|
||||
res.domain_name,
|
||||
255 & res.router_address.bp_address_u.ip_addr.net,
|
||||
|
@ -102,11 +102,11 @@ bp_getfile_arg *getfile;
|
|||
char *where, *index();
|
||||
static bp_getfile_res res;
|
||||
|
||||
if (debug)
|
||||
if (debug)
|
||||
fprintf(stderr,"getfile got question for \"%s\" and file \"%s\"\n",
|
||||
getfile->client_name, getfile->file_id);
|
||||
|
||||
if (dolog)
|
||||
if (dolog)
|
||||
syslog(LOG_NOTICE,"getfile got question for \"%s\" and file \"%s\"\n",
|
||||
getfile->client_name, getfile->file_id);
|
||||
|
||||
|
@ -137,14 +137,14 @@ bp_getfile_arg *getfile;
|
|||
bzero(&res.server_address.bp_address_u.ip_addr,4);
|
||||
} else goto failed;
|
||||
}
|
||||
if (debug)
|
||||
if (debug)
|
||||
fprintf(stderr, "returning server:%s path:%s address: %d.%d.%d.%d\n",
|
||||
res.server_name, res.server_path,
|
||||
255 & res.server_address.bp_address_u.ip_addr.net,
|
||||
255 & res.server_address.bp_address_u.ip_addr.host,
|
||||
255 & res.server_address.bp_address_u.ip_addr.lh,
|
||||
255 & res.server_address.bp_address_u.ip_addr.impno);
|
||||
if (dolog)
|
||||
if (dolog)
|
||||
syslog(LOG_NOTICE, "returning server:%s path:%s address: %d.%d.%d.%d\n",
|
||||
res.server_name, res.server_path,
|
||||
255 & res.server_address.bp_address_u.ip_addr.net,
|
||||
|
@ -155,14 +155,14 @@ bp_getfile_arg *getfile;
|
|||
}
|
||||
failed:
|
||||
if (debug) fprintf(stderr, "getfile failed for %s\n", getfile->client_name);
|
||||
if (dolog) syslog(LOG_NOTICE,
|
||||
if (dolog) syslog(LOG_NOTICE,
|
||||
"getfile failed for %s\n", getfile->client_name);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
/* getthefile return 1 and fills the buffer with the information
|
||||
of the file, e g "host:/export/root/client" if it can be found.
|
||||
If the host is in the database, but the file is not, the buffer
|
||||
If the host is in the database, but the file is not, the buffer
|
||||
will be empty. (This makes it possible to give the special
|
||||
empty answer for the file "dump") */
|
||||
|
||||
|
@ -218,7 +218,7 @@ char *fileid, *buffer;
|
|||
}
|
||||
/* skip to next entry */
|
||||
if ( match ) break;
|
||||
pch = ch = getc(bpf);
|
||||
pch = ch = getc(bpf);
|
||||
while ( ! ( ch == '\n' && pch != '\\') && ch != EOF) {
|
||||
pch = ch; ch = getc(bpf);
|
||||
}
|
||||
|
@ -238,8 +238,8 @@ char *fileid, *buffer;
|
|||
strcpy(buffer, where); /* found file */
|
||||
res = 1; break;
|
||||
}
|
||||
} else {
|
||||
while (isspace(ch) && ch != '\n') ch = getc(bpf);
|
||||
} else {
|
||||
while (isspace(ch) && ch != '\n') ch = getc(bpf);
|
||||
/* read to end of line */
|
||||
if ( ch == '\n' ) { /* didn't find it */
|
||||
res = -1; break; /* but host is there */
|
||||
|
@ -319,7 +319,7 @@ char *hostname;
|
|||
return(res);
|
||||
}
|
||||
/* skip to next entry */
|
||||
pch = ch = getc(bpf);
|
||||
pch = ch = getc(bpf);
|
||||
while ( ! ( ch == '\n' && pch != '\\') && ch != EOF) {
|
||||
pch = ch; ch = getc(bpf);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/*
|
||||
|
||||
This code is not copyright, and is placed in the public domain. Feel free to
|
||||
This code is not copyright, and is placed in the public domain. Feel free to
|
||||
use and modify. Please send modifications and/or suggestions + bug fixes to
|
||||
|
||||
Klas Heggemann <klas@nada.kth.se>
|
||||
|
||||
|
||||
$Id$
|
||||
$Id: main.c,v 1.1.1.1 1995/02/26 23:40:52 wpaul Exp $
|
||||
|
||||
*/
|
||||
|
||||
|
@ -73,7 +73,7 @@ char **argv;
|
|||
break;
|
||||
case 's':
|
||||
dolog = 1;
|
||||
#ifndef LOG_DAEMON
|
||||
#ifndef LOG_DAEMON
|
||||
openlog(progname, 0 , 0);
|
||||
#else
|
||||
openlog(progname, 0 , LOG_DAEMON);
|
||||
|
@ -81,7 +81,7 @@ char **argv;
|
|||
#endif
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,
|
||||
fprintf(stderr,
|
||||
"Usage: %s [-d ] [ -s ] [ -r router ] [ -f bootparmsfile ]\n");
|
||||
exit(1);
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ char **argv;
|
|||
close(s);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
(void)pmap_unset(BOOTPARAMPROG, BOOTPARAMVERS);
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# from: @(#)Makefile 5.8 (Berkeley) 7/28/90
|
||||
# $Id: Makefile,v 1.3 1995/03/01 20:36:20 jkh Exp $
|
||||
# $Id: Makefile,v 1.4 1995/03/02 22:00:33 wpaul Exp $
|
||||
|
||||
PROG= callbootd
|
||||
SRCS= bootparam_prot_xdr.c bootparam_prot_clnt.c callbootd.c
|
||||
NOMAN=
|
||||
NOMAN=
|
||||
CFLAGS+= -I.
|
||||
CLEANFILES= bootparam_prot_clnt.c bootparam_prot_xdr.c \
|
||||
bootparam_prot.h bootparam_prot.x
|
||||
|
@ -18,7 +18,7 @@ bootparam_prot_xdr.c: bootparam_prot.h
|
|||
cp ${DESTDIR}/usr/include/rpcsvc/bootparam_prot.x .
|
||||
rpcgen -c -o bootparam_prot_xdr.c bootparam_prot.x
|
||||
|
||||
bootparam_prot.h:
|
||||
bootparam_prot.h:
|
||||
rm -f bootparam_prot.x
|
||||
cp ${DESTDIR}/usr/include/rpcsvc/bootparam_prot.x .
|
||||
rpcgen -h -o bootparam_prot.h bootparam_prot.x
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/*
|
||||
|
||||
This code is not copyright, and is placed in the public domain. Feel free to
|
||||
This code is not copyright, and is placed in the public domain. Feel free to
|
||||
use and modify. Please send modifications and/or suggestions + bug fixes to
|
||||
|
||||
Klas Heggemann <klas@nada.kth.se>
|
||||
|
||||
$Id: callbootd.c,v 1.1.1.1 1995/02/26 23:40:53 wpaul Exp $
|
||||
$Id: callbootd.c,v 1.2 1995/03/26 03:15:39 wpaul Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
@ -59,13 +59,13 @@ char **argv;
|
|||
{
|
||||
int stat;
|
||||
char *server;
|
||||
|
||||
|
||||
bp_whoami_arg whoami_arg;
|
||||
bp_whoami_res *whoami_res, stat_whoami_res;
|
||||
bp_getfile_arg getfile_arg;
|
||||
bp_getfile_res *getfile_res, stat_getfile_res;
|
||||
|
||||
|
||||
|
||||
long the_inet_addr;
|
||||
CLIENT *clnt;
|
||||
enum clnt_stat clnt_stat;
|
||||
|
@ -75,20 +75,20 @@ char **argv;
|
|||
|
||||
stat_getfile_res.server_name = cln;
|
||||
stat_getfile_res.server_path = path;
|
||||
|
||||
|
||||
if (argc < 3) {
|
||||
fprintf(stderr,
|
||||
"Usage: %s server procnum (IP-addr | host fileid)\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
server = argv[1];
|
||||
if ( ! strcmp(server , "all") ) broadcast = 1;
|
||||
|
||||
|
||||
if ( ! broadcast ) {
|
||||
clnt = clnt_create(server,BOOTPARAMPROG, BOOTPARAMVERS, "udp");
|
||||
}
|
||||
}
|
||||
|
||||
if ( clnt == NULL ) {
|
||||
fprintf (stderr, "%s: could not contact bootparam server on host %s\n",
|
||||
|
@ -115,9 +115,9 @@ char **argv;
|
|||
} else
|
||||
exit(0);
|
||||
} else {
|
||||
clnt_stat=clnt_broadcast(BOOTPARAMPROG, BOOTPARAMVERS,
|
||||
clnt_stat=clnt_broadcast(BOOTPARAMPROG, BOOTPARAMVERS,
|
||||
BOOTPARAMPROC_WHOAMI,
|
||||
xdr_bp_whoami_arg, &whoami_arg,
|
||||
xdr_bp_whoami_arg, &whoami_arg,
|
||||
xdr_bp_whoami_res, &stat_whoami_res, eachres_whoami);
|
||||
exit(0);
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ char **argv;
|
|||
|
||||
getfile_arg.client_name = argv[2];
|
||||
getfile_arg.file_id = argv[3];
|
||||
|
||||
|
||||
if (! broadcast ) {
|
||||
getfile_res = bootparamproc_getfile_1(&getfile_arg,clnt);
|
||||
printf("getfile returning:\n");
|
||||
|
@ -134,26 +134,26 @@ char **argv;
|
|||
fprintf(stderr, "Bad answer returned from server %s\n", server);
|
||||
exit(1);
|
||||
} else
|
||||
exit(0);
|
||||
exit(0);
|
||||
} else {
|
||||
clnt_stat=clnt_broadcast(BOOTPARAMPROG, BOOTPARAMVERS,
|
||||
clnt_stat=clnt_broadcast(BOOTPARAMPROG, BOOTPARAMVERS,
|
||||
BOOTPARAMPROC_GETFILE,
|
||||
xdr_bp_getfile_arg, &getfile_arg,
|
||||
xdr_bp_getfile_arg, &getfile_arg,
|
||||
xdr_bp_getfile_res, &stat_getfile_res,eachres_getfile);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
default:
|
||||
|
||||
|
||||
fprintf(stderr,
|
||||
"Usage: %s server procnum (IP-addr | host fileid)\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int printwhoami(res)
|
||||
bp_whoami_res *res;
|
||||
{
|
||||
|
@ -171,7 +171,7 @@ bp_whoami_res *res;
|
|||
return(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -181,7 +181,7 @@ bp_getfile_res *res;
|
|||
{
|
||||
if (res) {
|
||||
printf("server_name:\t%s\nserver_address:\t%s\npath:\t%s\n",
|
||||
res->server_name,
|
||||
res->server_name,
|
||||
inet_ntoa(res->server_address.bp_address_u.ip_addr),
|
||||
res->server_path);
|
||||
return(0);
|
||||
|
|
|
@ -29,7 +29,7 @@ main (int argc, char **argv)
|
|||
int rc;
|
||||
|
||||
switch (argc) {
|
||||
case 2: cdname = argv[1];
|
||||
case 2: cdname = argv[1];
|
||||
break;
|
||||
case 1: if(cdname = getenv("CDPLAY"))
|
||||
/* Break if CDPLAY is set */
|
||||
|
@ -173,7 +173,7 @@ int
|
|||
setvol (int l, int r)
|
||||
{
|
||||
struct ioc_vol v;
|
||||
|
||||
|
||||
v.vol[0] = l;
|
||||
v.vol[1] = r;
|
||||
v.vol[2] = 0;
|
||||
|
@ -181,10 +181,10 @@ setvol (int l, int r)
|
|||
return ioctl (cd_fd, CDIOCSETVOL, &v);
|
||||
}
|
||||
int
|
||||
getvol (int *l, int *r)
|
||||
getvol (int *l, int *r)
|
||||
{
|
||||
struct ioc_vol v;
|
||||
if (ioctl (cd_fd, CDIOCGETVOL, &v) < 0)
|
||||
if (ioctl (cd_fd, CDIOCGETVOL, &v) < 0)
|
||||
return -1;
|
||||
*l = v.vol[0];
|
||||
*r = v.vol[1];
|
||||
|
@ -207,7 +207,7 @@ read_toc_entrys (int len)
|
|||
return ioctl (cd_fd, CDIOREADTOCENTRYS, (char *) &t);
|
||||
}
|
||||
int
|
||||
play_msf (int start_m, int start_s, int start_f,
|
||||
play_msf (int start_m, int start_s, int start_f,
|
||||
int end_m, int end_s, int end_f)
|
||||
{
|
||||
struct ioc_play_msf a;
|
||||
|
@ -231,7 +231,7 @@ status (int *trk, int *min, int *sec, int *frame)
|
|||
s.address_format = CD_MSF_FORMAT;
|
||||
s.data_format = CD_CURRENT_POSITION;
|
||||
open_cd ();
|
||||
if (ioctl (cd_fd, CDIOCREADSUBCHANNEL, (char *) &s) < 0)
|
||||
if (ioctl (cd_fd, CDIOCREADSUBCHANNEL, (char *) &s) < 0)
|
||||
return -1;
|
||||
*trk = s.data->what.position.track_number;
|
||||
*min = s.data->what.position.reladdr.msf.minute;
|
||||
|
@ -239,7 +239,7 @@ status (int *trk, int *min, int *sec, int *frame)
|
|||
*frame = s.data->what.position.reladdr.msf.frame;
|
||||
return s.data->header.audio_status;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
input ()
|
||||
{
|
||||
|
|
|
@ -76,10 +76,10 @@ main(argc, argv)
|
|||
FTSENT *p;
|
||||
int Hflag, Lflag, Pflag, ch, fts_options, hflag, rval;
|
||||
char *cp;
|
||||
|
||||
|
||||
myname = (cp = rindex(*argv, '/')) ? cp + 1 : *argv;
|
||||
ischown = myname[2] == 'o';
|
||||
|
||||
|
||||
Hflag = Lflag = Pflag = hflag = 0;
|
||||
while ((ch = getopt(argc, argv, "HLPRfh")) != EOF)
|
||||
switch (ch) {
|
||||
|
@ -145,9 +145,9 @@ main(argc, argv)
|
|||
if ((cp = strchr(*argv, ':')) != NULL) {
|
||||
*cp++ = '\0';
|
||||
a_gid(cp);
|
||||
}
|
||||
}
|
||||
a_uid(*argv);
|
||||
} else
|
||||
} else
|
||||
a_gid(*argv);
|
||||
|
||||
if ((ftsp = fts_open(++argv, fts_options, 0)) == NULL)
|
||||
|
@ -259,7 +259,7 @@ chownerr(file)
|
|||
}
|
||||
}
|
||||
|
||||
if (!fflag)
|
||||
if (!fflag)
|
||||
warn("%s", file);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@ -416,7 +416,7 @@ exclude(nv, name, what)
|
|||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Map things like "ra0b" => makedev(major("ra"), 0*8 + 'b'-'a').
|
||||
* Handle the case where the device number is given but there is no
|
||||
* corresponding name, and map NULL to the default.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@ -55,7 +55,7 @@
|
|||
static void nomem __P((void));
|
||||
static void vxerror __P((const char *, int, const char *, va_list));
|
||||
|
||||
/*
|
||||
/*
|
||||
* Malloc, with abort on error.
|
||||
*/
|
||||
void *
|
||||
|
@ -69,7 +69,7 @@ emalloc(size)
|
|||
return (p);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Realloc, with abort on error.
|
||||
*/
|
||||
void *
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#define NODEV ((dev_t)-1)
|
||||
|
||||
struct file_list {
|
||||
struct file_list *f_next;
|
||||
struct file_list *f_next;
|
||||
char *f_fn; /* the name */
|
||||
u_char f_type; /* see below */
|
||||
u_char f_flags; /* see below */
|
||||
|
|
|
@ -102,7 +102,7 @@ vax_ioconf()
|
|||
continue;
|
||||
}
|
||||
if (dp->d_slave != UNKNOWN) {
|
||||
printf("can't specify slave number for %s%d\n",
|
||||
printf("can't specify slave number for %s%d\n",
|
||||
dp->d_name, dp->d_unit);
|
||||
continue;
|
||||
}
|
||||
|
@ -865,7 +865,7 @@ scbus_devtab(fp, dev_idp)
|
|||
"%s%s which is not fixed at a single adapter.\n",
|
||||
mp->d_name, wnum(mp->d_unit));
|
||||
}
|
||||
|
||||
|
||||
fprintf(fp, "{ ");
|
||||
fprintf(fp, "\"%s\", ", dp->d_name);
|
||||
id_put(fp, dp->d_unit, ", ");
|
||||
|
|
|
@ -234,7 +234,7 @@ read_files()
|
|||
register struct opt *op;
|
||||
char *wd, *this, *needs, *special, *depends, *clean;
|
||||
char fname[32];
|
||||
int nreqs, first = 1, configdep, isdup, std, filetype,
|
||||
int nreqs, first = 1, configdep, isdup, std, filetype,
|
||||
imp_rule, no_obj, before_depend;
|
||||
|
||||
ftab = 0;
|
||||
|
@ -253,7 +253,7 @@ read_files()
|
|||
/*
|
||||
* filename [ standard | optional ] [ config-dependent ]
|
||||
* [ dev* | profiling-routine ] [ device-driver] [ no-obj ]
|
||||
* [ compile-with "compile rule" [no-implicit-rule] ]
|
||||
* [ compile-with "compile rule" [no-implicit-rule] ]
|
||||
* [ dependency "dependency-list"] [ before-depend ]
|
||||
* [ clean "file-list"]
|
||||
*/
|
||||
|
@ -624,15 +624,15 @@ do_rules(f)
|
|||
else {
|
||||
*cp = '\0';
|
||||
if (och == 'o') {
|
||||
fprintf(f, "%so:\n\t-cp $S/%so .\n\n",
|
||||
fprintf(f, "%so:\n\t-cp $S/%so .\n\n",
|
||||
tail(np), np);
|
||||
continue;
|
||||
}
|
||||
if (ftp->f_depends)
|
||||
fprintf(f, "%so: $S/%s%c %s\n", tail(np),
|
||||
fprintf(f, "%so: $S/%s%c %s\n", tail(np),
|
||||
np, och, ftp->f_depends);
|
||||
else
|
||||
fprintf(f, "%so: $S/%s%c\n", tail(np),
|
||||
fprintf(f, "%so: $S/%s%c\n", tail(np),
|
||||
np, och);
|
||||
}
|
||||
tp = tail(np);
|
||||
|
|
|
@ -195,7 +195,7 @@ char *
|
|||
devtoname(dev)
|
||||
dev_t dev;
|
||||
{
|
||||
char buf[80];
|
||||
char buf[80];
|
||||
register struct devdescription *dp;
|
||||
int part;
|
||||
char partname[2];
|
||||
|
@ -242,7 +242,7 @@ initdevtable()
|
|||
* Allow a comment *
|
||||
\*******************************/
|
||||
if(linebuf[0] == '#') continue;
|
||||
|
||||
|
||||
if (sscanf(linebuf, "%s\t%d\n", buf, &maj) == 2) {
|
||||
*dp = (struct devdescription *)malloc(sizeof (**dp));
|
||||
(*dp)->dev_name = ns(buf);
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
/* cron.h - header for vixie's cron
|
||||
*
|
||||
* $Id: cron.h,v 2.10 1994/01/15 20:43:43 vixie Exp $
|
||||
* $Id: cron.h,v 1.1.1.1 1994/08/27 13:43:04 jkh Exp $
|
||||
*
|
||||
* vix 14nov88 [rest of log is in RCS]
|
||||
* vix 14jan87 [0 or 7 can be sunday; thanks, mwm@berkeley]
|
||||
|
@ -147,7 +147,7 @@
|
|||
|
||||
typedef struct _entry {
|
||||
struct _entry *next;
|
||||
uid_t uid;
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
char **envp;
|
||||
char *cmd;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
#if !defined(lint) && !defined(LINT)
|
||||
static char rcsid[] = "$Id: do_command.c,v 1.3 1995/04/13 20:58:13 ache Exp $";
|
||||
static char rcsid[] = "$Id: do_command.c,v 1.4 1995/04/14 21:54:18 ache Exp $";
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -114,7 +114,7 @@ child_process(e, u)
|
|||
*/
|
||||
pipe(stdin_pipe); /* child's stdin */
|
||||
pipe(stdout_pipe); /* child's stdout */
|
||||
|
||||
|
||||
/* since we are a forked process, we can diddle the command string
|
||||
* we were passed -- nobody else is going to use it again, right?
|
||||
*
|
||||
|
@ -354,7 +354,7 @@ child_process(e, u)
|
|||
*/
|
||||
mailto = usernm;
|
||||
}
|
||||
|
||||
|
||||
/* if we are supposed to be mailing, MAILTO will
|
||||
* be non-NULL. only in this case should we set
|
||||
* up the mail command and subjects and stuff...
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
#if !defined(lint) && !defined(LINT)
|
||||
static char rcsid[] = "$Id: user.c,v 2.8 1994/01/15 20:43:43 vixie Exp $";
|
||||
static char rcsid[] = "$Id: user.c,v 1.1.1.1 1994/08/27 13:43:03 jkh Exp $";
|
||||
#endif
|
||||
|
||||
/* vix 26jan87 [log is in RCS file]
|
||||
|
@ -67,7 +67,7 @@ load_user(crontab_fd, pw, name)
|
|||
u->name = strdup(name);
|
||||
u->crontab = NULL;
|
||||
|
||||
/*
|
||||
/*
|
||||
* init environment. this will be copied/augmented for each entry.
|
||||
*/
|
||||
envp = env_init();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
BINDIR?= /usr/bin
|
||||
|
||||
PROG= crontab
|
||||
SRCS= crontab.c
|
||||
SRCS= crontab.c
|
||||
CFLAGS+= -I${.CURDIR}/../cron
|
||||
MAN1= crontab.1
|
||||
MAN5= crontab.5
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
#if !defined(lint) && !defined(LINT)
|
||||
static char rcsid[] = "$Id: crontab.c,v 1.4 1994/04/13 21:57:55 wollman Exp $";
|
||||
static char rcsid[] = "$Id: crontab.c,v 1.2 1994/12/21 11:06:08 ache Exp $";
|
||||
#endif
|
||||
|
||||
/* crontab - install and manage per-user crontab files
|
||||
|
@ -129,7 +129,7 @@ main(argc, argv)
|
|||
exit(0);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
parse_args(argc, argv)
|
||||
|
@ -480,7 +480,7 @@ edit_cmd() {
|
|||
done:
|
||||
log_it(RealUser, Pid, "END EDIT", User);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* returns 0 on success
|
||||
* -1 on syntax error
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
# Makefile for vixie's cron
|
||||
#
|
||||
# $Id: Makefile,v 2.9 1994/01/15 20:43:43 vixie Exp $
|
||||
# $Id: Makefile.vixie,v 1.1.1.1 1994/08/27 13:43:03 jkh Exp $
|
||||
#
|
||||
# vix 03mar88 [moved to RCS, rest of log is in there]
|
||||
# vix 30mar87 [goodbye, time.c; hello, getopt]
|
||||
|
@ -35,7 +35,7 @@
|
|||
# SHELL is for the 'augumented make' systems where 'make' imports
|
||||
# SHELL from the environment and then uses it to run its commands.
|
||||
# if your environment SHELL variable is /bin/csh, make goes real
|
||||
# slow and sometimes does the wrong thing.
|
||||
# slow and sometimes does the wrong thing.
|
||||
#
|
||||
# this package needs the 'bitstring macros' library, which is
|
||||
# available from me or from the comp.sources.unix archive. if you
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
#if !defined(lint) && !defined(LINT)
|
||||
static char rcsid[] = "$Id: compat.c,v 1.6 1994/01/15 20:43:43 vixie Exp $";
|
||||
static char rcsid[] = "$Id: compat.c,v 1.1.1.1 1994/08/27 13:43:02 jkh Exp $";
|
||||
#endif
|
||||
|
||||
/* vix 30dec93 [broke this out of misc.c - see RCS log for history]
|
||||
|
@ -143,7 +143,7 @@ getdtablesize() {
|
|||
* Snarfage done by Jarkko Hietaniemi <Jarkko.Hietaniemi@hut.fi>
|
||||
* *) well, almost, had to K&R the function entry, HPUX "cc"
|
||||
* does not grok ANSI function prototypes */
|
||||
|
||||
|
||||
/*
|
||||
* flock (fd, operation)
|
||||
*
|
||||
|
@ -199,13 +199,13 @@ flock(fd, operation)
|
|||
case LOCK_UN: /* unlock */
|
||||
i = lockf (fd, F_ULOCK, 0);
|
||||
break;
|
||||
|
||||
|
||||
default: /* can't decipher operation */
|
||||
i = -1;
|
||||
errno = EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return (i);
|
||||
}
|
||||
#endif /*NEED_FLOCK*/
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
#if !defined(lint) && !defined(LINT)
|
||||
static char rcsid[] = "$Id: entry.c,v 1.1.1.1 1994/08/27 13:43:02 jkh Exp $";
|
||||
static char rcsid[] = "$Id: entry.c,v 1.2 1995/04/12 19:04:26 ache Exp $";
|
||||
#endif
|
||||
|
||||
/* vix 26jan87 [RCS'd; rest of log is in RCS file]
|
||||
|
@ -271,7 +271,7 @@ load_entry(file, error_func, pw, envp)
|
|||
* too bad we don't know in advance how long it will be, since we
|
||||
* need to malloc a string for it... so, we limit it to MAX_COMMAND.
|
||||
* XXX - should use realloc().
|
||||
*/
|
||||
*/
|
||||
ch = get_string(cmd, MAX_COMMAND, file, "\n");
|
||||
|
||||
/* a file without a \n before the EOF is rude, so we'll complain...
|
||||
|
@ -321,7 +321,7 @@ get_list(bits, low, high, names, ch, file)
|
|||
|
||||
/* list = range {"," range}
|
||||
*/
|
||||
|
||||
|
||||
/* clear the bit string, since the default is 'off'.
|
||||
*/
|
||||
bit_nclear(bits, 0, (high-low+1));
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
#if !defined(lint) && !defined(LINT)
|
||||
static char rcsid[] = "$Id: misc.c,v 1.1.1.1 1994/08/27 13:43:02 jkh Exp $";
|
||||
static char rcsid[] = "$Id: misc.c,v 1.2 1995/04/29 13:25:13 ache Exp $";
|
||||
#endif
|
||||
|
||||
/* vix 26jan87 [RCS has the rest of the log]
|
||||
|
@ -639,7 +639,7 @@ arpadate(clock)
|
|||
time_t t = clock ?*clock :time(0L);
|
||||
struct tm *tm = localtime(&t);
|
||||
static char ret[30]; /* zone name might be >3 chars */
|
||||
|
||||
|
||||
(void) sprintf(ret, "%s, %2d %s %2d %02d:%02d:%02d %s",
|
||||
DowNames[tm->tm_wday],
|
||||
tm->tm_mday,
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
* University of Maryland at College Park
|
||||
*/
|
||||
/*
|
||||
* crunched_main.c - main program for crunched binaries, it branches to a
|
||||
* crunched_main.c - main program for crunched binaries, it branches to a
|
||||
* particular subprogram based on the value of argv[0]. Also included
|
||||
* is a little program invoked when the crunched binary is called via
|
||||
* its EXECNAME. This one prints out the list of compiled-in binaries,
|
||||
|
@ -84,7 +84,7 @@ int crunched_main(int argc, char **argv)
|
|||
struct stub *ep;
|
||||
int columns, len;
|
||||
|
||||
if(argc <= 1)
|
||||
if(argc <= 1)
|
||||
crunched_usage();
|
||||
|
||||
return main(--argc, ++argv);
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
* crunchgen.c
|
||||
*
|
||||
* Generates a Makefile and main C file for a crunched executable,
|
||||
* from specs given in a .conf file.
|
||||
* from specs given in a .conf file.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
@ -98,7 +98,7 @@ int is_nonempty_file(char *pathname);
|
|||
|
||||
/* helper routines for main() */
|
||||
|
||||
void usage(void);
|
||||
void usage(void);
|
||||
void parse_conf_file(void);
|
||||
void gen_outputs(void);
|
||||
|
||||
|
@ -113,7 +113,7 @@ int main(int argc, char **argv)
|
|||
verbose = 1;
|
||||
readcache = 1;
|
||||
*outmkname = *outcfname = *execfname = '\0';
|
||||
|
||||
|
||||
if(argc > 0) pname = argv[0];
|
||||
|
||||
while((optc = getopt(argc, argv, "lm:c:e:fq")) != -1) {
|
||||
|
@ -136,7 +136,7 @@ int main(int argc, char **argv)
|
|||
|
||||
if(argc != 1) usage();
|
||||
|
||||
/*
|
||||
/*
|
||||
* generate filenames
|
||||
*/
|
||||
|
||||
|
@ -171,7 +171,7 @@ int main(int argc, char **argv)
|
|||
|
||||
void usage(void)
|
||||
{
|
||||
fprintf(stderr,
|
||||
fprintf(stderr,
|
||||
"%s [-fq] [-m <makefile>] [-c <c file>] [-e <exec file>] <conffile>\n",
|
||||
pname);
|
||||
exit(1);
|
||||
|
@ -187,7 +187,7 @@ void usage(void)
|
|||
/* helper routines for parse_conf_file */
|
||||
|
||||
void parse_one_file(char *filename);
|
||||
void parse_line(char *line, int *fc, char **fv, int nf);
|
||||
void parse_line(char *line, int *fc, char **fv, int nf);
|
||||
void add_srcdirs(int argc, char **argv);
|
||||
void add_progs(int argc, char **argv);
|
||||
void add_link(int argc, char **argv);
|
||||
|
@ -247,7 +247,7 @@ void parse_one_file(char *filename)
|
|||
continue;
|
||||
}
|
||||
if(fieldc < 2) {
|
||||
fprintf(stderr,
|
||||
fprintf(stderr,
|
||||
"%s:%d: %s command needs at least 1 argument, skipping.\n",
|
||||
curfilename, linenum, fieldv[0]);
|
||||
goterror = 1;
|
||||
|
@ -291,7 +291,7 @@ void add_srcdirs(int argc, char **argv)
|
|||
if(is_dir(argv[i]))
|
||||
add_string(&srcdirs, argv[i]);
|
||||
else {
|
||||
fprintf(stderr, "%s:%d: `%s' is not a directory, skipping it.\n",
|
||||
fprintf(stderr, "%s:%d: `%s' is not a directory, skipping it.\n",
|
||||
curfilename, linenum, argv[i]);
|
||||
goterror = 1;
|
||||
}
|
||||
|
@ -319,7 +319,7 @@ void add_prog(char *progname)
|
|||
|
||||
p2 = malloc(sizeof(prog_t));
|
||||
if(p2) p2->name = strdup(progname);
|
||||
if(!p2 || !p2->name)
|
||||
if(!p2 || !p2->name)
|
||||
out_of_memory();
|
||||
|
||||
p2->next = NULL;
|
||||
|
@ -340,7 +340,7 @@ void add_link(int argc, char **argv)
|
|||
prog_t *p = find_prog(argv[1]);
|
||||
|
||||
if(p == NULL) {
|
||||
fprintf(stderr,
|
||||
fprintf(stderr,
|
||||
"%s:%d: no prog %s previously declared, skipping link.\n",
|
||||
curfilename, linenum, argv[1]);
|
||||
goterror = 1;
|
||||
|
@ -370,7 +370,7 @@ void add_special(int argc, char **argv)
|
|||
|
||||
if(p == NULL) {
|
||||
if(reading_cache) return;
|
||||
fprintf(stderr,
|
||||
fprintf(stderr,
|
||||
"%s:%d: no prog %s previously declared, skipping special.\n",
|
||||
curfilename, linenum, argv[1]);
|
||||
goterror = 1;
|
||||
|
@ -411,7 +411,7 @@ void add_special(int argc, char **argv)
|
|||
|
||||
|
||||
argcount:
|
||||
fprintf(stderr,
|
||||
fprintf(stderr,
|
||||
"%s:%d: too %s arguments, expected \"special %s %s <string>\".\n",
|
||||
curfilename, linenum, argc < 4? "few" : "many", argv[1], argv[2]);
|
||||
goterror = 1;
|
||||
|
@ -463,7 +463,7 @@ void gen_outputs(void)
|
|||
gen_output_cfile();
|
||||
gen_output_makefile();
|
||||
status("");
|
||||
fprintf(stderr,
|
||||
fprintf(stderr,
|
||||
"Run \"make -f %s objs exe\" to build crunched binary.\n",
|
||||
outmkname);
|
||||
}
|
||||
|
@ -478,7 +478,7 @@ void fillin_program(prog_t *p)
|
|||
sprintf(line, "filling in parms for %s", p->name);
|
||||
status(line);
|
||||
|
||||
if(!p->ident)
|
||||
if(!p->ident)
|
||||
p->ident = genident(p->name);
|
||||
if(!p->srcdir) {
|
||||
srcparent = dir_search(p->name);
|
||||
|
@ -509,11 +509,11 @@ void fillin_program(prog_t *p)
|
|||
fprintf(stderr, "%s: %s: warning: could not find source directory.\n",
|
||||
infilename, p->name);
|
||||
if(!p->objs && verbose)
|
||||
fprintf(stderr, "%s: %s: warning: could not find any .o files.\n",
|
||||
fprintf(stderr, "%s: %s: warning: could not find any .o files.\n",
|
||||
infilename, p->name);
|
||||
|
||||
if(!p->objpaths) {
|
||||
fprintf(stderr,
|
||||
fprintf(stderr,
|
||||
"%s: %s: error: no objpaths specified or calculated.\n",
|
||||
infilename, p->name);
|
||||
p->goterror = goterror = 1;
|
||||
|
@ -533,7 +533,7 @@ void fillin_program_objs(prog_t *p, char *path)
|
|||
goterror = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
fprintf(f, ".include \"%s\"\n", path);
|
||||
fprintf(f, ".if defined(PROG) && !defined(OBJS)\n");
|
||||
fprintf(f, "OBJS=${PROG}.o\n");
|
||||
|
@ -551,7 +551,7 @@ void fillin_program_objs(prog_t *p, char *path)
|
|||
while(fgets(line, MAXLINELEN, f)) {
|
||||
if(strncmp(line, "OBJS= ", 6)) {
|
||||
fprintf(stderr, "make error: %s", line);
|
||||
goterror = 1;
|
||||
goterror = 1;
|
||||
continue;
|
||||
}
|
||||
cp = line + 6;
|
||||
|
@ -575,8 +575,8 @@ void remove_error_progs(void)
|
|||
{
|
||||
prog_t *p1, *p2;
|
||||
|
||||
p1 = NULL; p2 = progs;
|
||||
while(p2 != NULL) {
|
||||
p1 = NULL; p2 = progs;
|
||||
while(p2 != NULL) {
|
||||
if(!p2->goterror)
|
||||
p1 = p2, p2 = p2->next;
|
||||
else {
|
||||
|
@ -644,7 +644,7 @@ void gen_output_makefile(void)
|
|||
top_makefile_rules(outmk);
|
||||
|
||||
for(p = progs; p != NULL; p = p->next)
|
||||
prog_makefile_rules(outmk, p);
|
||||
prog_makefile_rules(outmk, p);
|
||||
|
||||
fprintf(outmk, "\n# ========\n");
|
||||
fclose(outmk);
|
||||
|
@ -668,7 +668,7 @@ void gen_output_cfile(void)
|
|||
return;
|
||||
}
|
||||
|
||||
fprintf(outcf,
|
||||
fprintf(outcf,
|
||||
"/* %s - generated from %s by crunchgen %s */\n",
|
||||
outcfname, infilename, CRUNCH_VERSION);
|
||||
|
||||
|
@ -687,7 +687,7 @@ void gen_output_cfile(void)
|
|||
fprintf(outcf, "\t{ \"%s\", _crunched_%s_stub },\n",
|
||||
s->str, p->ident);
|
||||
}
|
||||
|
||||
|
||||
fprintf(outcf, "\t{ EXECNAME, crunched_main },\n");
|
||||
fprintf(outcf, "\t{ NULL, NULL }\n};\n");
|
||||
fclose(outcf);
|
||||
|
@ -745,7 +745,7 @@ void top_makefile_rules(FILE *outmk)
|
|||
fprintf(outmk, " %s_make", p->ident);
|
||||
fprintf(outmk, "\n\n");
|
||||
|
||||
fprintf(outmk, "%s: %s.o $(CRUNCHED_OBJS)\n",
|
||||
fprintf(outmk, "%s: %s.o $(CRUNCHED_OBJS)\n",
|
||||
execfname, execfname);
|
||||
fprintf(outmk, "\t$(CC) -static -o %s %s.o $(CRUNCHED_OBJS) $(LIBS)\n",
|
||||
execfname, execfname);
|
||||
|
@ -766,11 +766,11 @@ void prog_makefile_rules(FILE *outmk, prog_t *p)
|
|||
fprintf(outmk, "%s_OBJS=", p->ident);
|
||||
output_strlst(outmk, p->objs);
|
||||
fprintf(outmk, "%s_make:\n", p->ident);
|
||||
fprintf(outmk, "\t(cd $(%s_SRCDIR); make $(%s_OBJS))\n\n",
|
||||
fprintf(outmk, "\t(cd $(%s_SRCDIR); make $(%s_OBJS))\n\n",
|
||||
p->ident, p->ident);
|
||||
}
|
||||
else
|
||||
fprintf(outmk, "%s_make:\n\t@echo \"** cannot make objs for %s\"\n\n",
|
||||
fprintf(outmk, "%s_make:\n\t@echo \"** cannot make objs for %s\"\n\n",
|
||||
p->ident, p->name);
|
||||
|
||||
fprintf(outmk, "%s_OBJPATHS=", p->ident);
|
||||
|
@ -783,9 +783,9 @@ void prog_makefile_rules(FILE *outmk, prog_t *p)
|
|||
p->ident, p->name);
|
||||
fprintf(outmk, "%s.lo: %s_stub.o $(%s_OBJPATHS)\n",
|
||||
p->name, p->name, p->ident);
|
||||
fprintf(outmk, "\tld -dc -r -o %s.lo %s_stub.o $(%s_OBJPATHS)\n",
|
||||
fprintf(outmk, "\tld -dc -r -o %s.lo %s_stub.o $(%s_OBJPATHS)\n",
|
||||
p->name, p->name, p->ident);
|
||||
fprintf(outmk, "\tcrunchide -k __crunched_%s_stub %s.lo\n",
|
||||
fprintf(outmk, "\tcrunchide -k __crunched_%s_stub %s.lo\n",
|
||||
p->ident, p->name);
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
* - arrange that all the BSS segments start at the same address, so
|
||||
* that the final crunched binary BSS size is the max of all the
|
||||
* component programs' BSS sizes, rather than their sum.
|
||||
*/
|
||||
*/
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -6,15 +6,15 @@
|
|||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: ctm.c,v 1.9 1995/03/19 13:42:54 joerg Exp $
|
||||
* $Id: ctm.c,v 1.10 1995/03/26 20:09:50 phk Exp $
|
||||
*
|
||||
* This is the client program of 'CTM'. It will apply a CTM-patch to a
|
||||
* This is the client program of 'CTM'. It will apply a CTM-patch to a
|
||||
* collection of files.
|
||||
*
|
||||
* Options we'd like to see:
|
||||
*
|
||||
* -a Attempt best effort.
|
||||
* -b <dir> Base-dir
|
||||
* -b <dir> Base-dir
|
||||
* -B <file> Backup to tar-file.
|
||||
* -d <int> Debug TBD.
|
||||
* -m <mail-addr> Email me instead.
|
||||
|
@ -40,7 +40,7 @@
|
|||
extern int Proc(char *, unsigned applied);
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int stat=0;
|
||||
int c;
|
||||
|
@ -48,12 +48,12 @@ main(int argc, char **argv)
|
|||
extern char * optarg;
|
||||
FILE *statfile;
|
||||
unsigned applied = 0;
|
||||
|
||||
|
||||
Verbose = 1;
|
||||
Paranoid = 1;
|
||||
setbuf(stderr,0);
|
||||
setbuf(stdout,0);
|
||||
|
||||
|
||||
while((c=getopt(argc,argv,"ab:B:cd:Fm:pPqr:R:T:Vv")) != -1) {
|
||||
switch (c) {
|
||||
case 'c': CheckIt++; break; /* Only check it */
|
||||
|
@ -91,7 +91,7 @@ main(int argc, char **argv)
|
|||
fscanf(statfile, "%*s %u", &applied);
|
||||
fclose(statfile);
|
||||
}
|
||||
|
||||
|
||||
if(!argc)
|
||||
stat |= Proc("-", applied);
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: ctm.h,v 1.5 1994/10/24 20:09:21 phk Exp $
|
||||
* $Id: ctm.h,v 1.6 1995/03/04 20:36:45 phk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -66,7 +66,7 @@ EXTERN u_char *FileName;
|
|||
EXTERN u_char *BaseDir;
|
||||
EXTERN u_char *TmpDir;
|
||||
|
||||
/*
|
||||
/*
|
||||
* Paranoid -- Just in case they should be after us...
|
||||
* 0 not at all.
|
||||
* 1 normal.
|
||||
|
@ -75,7 +75,7 @@ EXTERN u_char *TmpDir;
|
|||
*
|
||||
* Verbose -- What to tell mom...
|
||||
* 0 Nothing which wouldn't surprise.
|
||||
* 1 Normal.
|
||||
* 1 Normal.
|
||||
* 2 Show progress '.'.
|
||||
* 3 Show progress names, and actions.
|
||||
* 4 even more...
|
||||
|
@ -89,7 +89,7 @@ EXTERN u_char *TmpDir;
|
|||
* 8 Destination-tree not correct.
|
||||
* 16 Destination-tree not correct, can force.
|
||||
* 32 Internal problems.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
EXTERN int Paranoid;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: ctm_ed.c,v 1.4 1994/09/22 02:49:17 phk Exp $
|
||||
* $Id: ctm_ed.c,v 1.5 1995/04/16 22:40:49 bde Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -20,9 +20,9 @@ ctm_edit(u_char *script, int length, char *filein, char *fileout)
|
|||
FILE *fi=0,*fo=0;
|
||||
|
||||
fi = fopen(filein,"r");
|
||||
if(!fi) {
|
||||
if(!fi) {
|
||||
perror(filein);
|
||||
return 8;
|
||||
return 8;
|
||||
}
|
||||
|
||||
fo = fopen(fileout,"w");
|
||||
|
@ -84,7 +84,7 @@ ctm_edit(u_char *script, int length, char *filein, char *fileout)
|
|||
}
|
||||
continue;
|
||||
}
|
||||
ret = 1;
|
||||
ret = 1;
|
||||
goto bye;
|
||||
}
|
||||
while(1) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: ctm_pass1.c,v 1.8 1995/03/04 20:36:46 phk Exp $
|
||||
* $Id: ctm_pass1.c,v 1.9 1995/03/26 20:09:52 phk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -27,15 +27,15 @@ Pass1(FILE *fd, unsigned applied)
|
|||
struct CTM_Syntax *sp;
|
||||
int slashwarn=0;
|
||||
unsigned current;
|
||||
|
||||
if(Verbose>3)
|
||||
|
||||
if(Verbose>3)
|
||||
printf("Pass1 -- Checking integrity of incoming CTM-patch\n");
|
||||
MD5Init (&ctx);
|
||||
|
||||
GETFIELD(p,' '); /* CTM_BEGIN */
|
||||
if(strcmp(p,"CTM_BEGIN")) {
|
||||
Fatal("Probably not a CTM-patch at all.");
|
||||
if(Verbose>3)
|
||||
if(Verbose>3)
|
||||
fprintf(stderr,"Expected \"CTM_BEGIN\" got \"%s\".\n",p);
|
||||
return 1;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ Pass1(FILE *fd, unsigned applied)
|
|||
GETFIELDCOPY(Version,' '); /* <Version> */
|
||||
if(strcmp(Version,VERSION)) {
|
||||
Fatal("CTM-patch is wrong version.");
|
||||
if(Verbose>3)
|
||||
if(Verbose>3)
|
||||
fprintf(stderr,"Expected \"%s\" got \"%s\".\n",VERSION,p);
|
||||
return 1;
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ Pass1(FILE *fd, unsigned applied)
|
|||
current);
|
||||
return Exit_Version;
|
||||
}
|
||||
|
||||
|
||||
for(;;) {
|
||||
if(md5) {Free(md5), md5 = 0;}
|
||||
if(trash) {Free(trash), trash = 0;}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: ctm_pass2.c,v 1.6 1995/02/04 19:20:48 phk Exp $
|
||||
* $Id: ctm_pass2.c,v 1.7 1995/03/19 12:01:23 roberto Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -28,7 +28,7 @@ Pass2(FILE *fd)
|
|||
struct stat st;
|
||||
int ret = 0;
|
||||
|
||||
if(Verbose>3)
|
||||
if(Verbose>3)
|
||||
printf("Pass2 -- Checking if CTM-patch will apply\n");
|
||||
MD5Init (&ctx);
|
||||
|
||||
|
@ -87,7 +87,7 @@ Pass2(FILE *fd)
|
|||
else
|
||||
ret |= Exit_NotOK;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (j & CTM_Q_Name_Dir) {
|
||||
if((st.st_mode & S_IFMT) != S_IFDIR) {
|
||||
fprintf(stderr,
|
||||
|
@ -96,7 +96,7 @@ Pass2(FILE *fd)
|
|||
ret |= Exit_NotOK;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (j & CTM_Q_Name_File) {
|
||||
if((st.st_mode & S_IFMT) != S_IFREG) {
|
||||
fprintf(stderr,
|
||||
|
@ -162,7 +162,7 @@ Pass2(FILE *fd)
|
|||
unlink(p);
|
||||
free(p);
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
default: WRONG
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: ctm_pass3.c,v 1.8 1995/02/04 19:20:49 phk Exp $
|
||||
* $Id: ctm_pass3.c,v 1.9 1995/03/25 20:46:51 joerg Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -28,7 +28,7 @@ Pass3(FILE *fd)
|
|||
FILE *ed=0;
|
||||
struct stat st;
|
||||
|
||||
if(Verbose>3)
|
||||
if(Verbose>3)
|
||||
printf("Pass3 -- Applying the CTM-patch\n");
|
||||
MD5Init (&ctx);
|
||||
|
||||
|
@ -74,9 +74,9 @@ Pass3(FILE *fd)
|
|||
case CTM_F_Mode: GETFIELDCOPY(mode,sep); break;
|
||||
case CTM_F_MD5:
|
||||
if(j & CTM_Q_MD5_Before)
|
||||
GETFIELDCOPY(md5before,sep);
|
||||
GETFIELDCOPY(md5before,sep);
|
||||
else
|
||||
GETFIELDCOPY(md5,sep);
|
||||
GETFIELDCOPY(md5,sep);
|
||||
break;
|
||||
case CTM_F_Count: GETBYTECNT(cnt,sep); break;
|
||||
case CTM_F_Bytes: GETDATA(trash,cnt); break;
|
||||
|
@ -105,7 +105,7 @@ Pass3(FILE *fd)
|
|||
WRONG
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if(!strcmp(sp->Key,"FE")) {
|
||||
ed = popen("ed","w");
|
||||
if(!ed) {
|
||||
|
@ -156,7 +156,7 @@ Pass3(FILE *fd)
|
|||
WRONG
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if(!strcmp(sp->Key,"FR")) {
|
||||
if (0 != unlink(name)) {
|
||||
fprintf(stderr,"<%s> unlink failed\n",name);
|
||||
|
@ -164,8 +164,8 @@ Pass3(FILE *fd)
|
|||
WRONG
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if(!strcmp(sp->Key,"DR")) {
|
||||
}
|
||||
if(!strcmp(sp->Key,"DR")) {
|
||||
/*
|
||||
* We cannot use rmdir() because we do not get the directories
|
||||
* in '-depth' order (cvs-cur.0018.gz for examples)
|
||||
|
@ -173,7 +173,7 @@ Pass3(FILE *fd)
|
|||
sprintf(buf,"rm -rf %s",name);
|
||||
system(buf);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
WRONG
|
||||
}
|
||||
q = MD5End (&ctx);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id$
|
||||
* $Id: ctm_syntax.c,v 1.4 1994/09/22 02:49:21 phk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -31,15 +31,15 @@
|
|||
#define Force CTM_Q_MD5_Force
|
||||
|
||||
static int ctmFM[] = /* File Make */
|
||||
{ Name|File|New, Uid, Gid, Mode,
|
||||
{ Name|File|New, Uid, Gid, Mode,
|
||||
MD5|After|Chunk, Count, Bytes,0 };
|
||||
|
||||
static int ctmFS[] = /* File Substitute */
|
||||
{ Name|File, Uid, Gid, Mode,
|
||||
{ Name|File, Uid, Gid, Mode,
|
||||
MD5|Before|Force, MD5|After|Chunk, Count, Bytes,0 };
|
||||
|
||||
static int ctmFE[] = /* File Edit */
|
||||
{ Name|File, Uid, Gid, Mode,
|
||||
{ Name|File, Uid, Gid, Mode,
|
||||
MD5|Before, MD5|After, Count, Bytes,0 };
|
||||
|
||||
static int ctmFR[] = /* File Remove */
|
||||
|
|
|
@ -556,9 +556,9 @@ combine(char *delta, int npieces, char *dname, char *pname, char *tname)
|
|||
* MIME BASE64 decode table.
|
||||
*/
|
||||
static unsigned char from_b64[0x80] =
|
||||
{
|
||||
{
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* For example:
|
||||
* zap -xz -f flame -q34 -- -x
|
||||
*
|
||||
*
|
||||
* where zap.c contains the following in main():
|
||||
*
|
||||
* OPTIONS("[-xz] [-q queue-id] [-f dump-file] user")
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: ctm_scan.c,v 1.9 1995/03/24 21:33:20 phk Exp $
|
||||
* $Id: ctm_scan.c,v 1.10 1995/03/24 21:36:32 phk Exp $
|
||||
*
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
@ -22,7 +22,7 @@
|
|||
int barf[256];
|
||||
int CheckMode = 0;
|
||||
|
||||
int
|
||||
int
|
||||
pstrcmp(const void *pp, const void *qq)
|
||||
{
|
||||
return strcmp(*(char **)pp,*(char **)qq);
|
||||
|
@ -41,7 +41,7 @@ Do(char *path)
|
|||
MD5_CTX ctx;
|
||||
int fd,i,j,k,l,npde,nde=0;
|
||||
char **pde;
|
||||
|
||||
|
||||
npde = 1;
|
||||
pde = malloc(sizeof *pde * (npde+1));
|
||||
d = opendir(path);
|
||||
|
@ -82,9 +82,9 @@ Do(char *path)
|
|||
switch(st.st_mode & S_IFMT) {
|
||||
case S_IFDIR:
|
||||
if(!CheckMode) {
|
||||
i = printf("d %s %o %lu %lu - - -\n",
|
||||
i = printf("d %s %o %lu %lu - - -\n",
|
||||
buf,st.st_mode & (~S_IFMT),st.st_uid,st.st_gid);
|
||||
if(!i)
|
||||
if(!i)
|
||||
exit(-1);
|
||||
}
|
||||
ret |= Do(buf);
|
||||
|
@ -170,7 +170,7 @@ main(int argc, char **argv)
|
|||
argv++;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Scan the directories recursively.
|
||||
*/
|
||||
if (argc > 1) {
|
||||
|
@ -182,6 +182,6 @@ main(int argc, char **argv)
|
|||
return i;
|
||||
}
|
||||
return i;
|
||||
} else
|
||||
} else
|
||||
return Do(".");
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
/*
|
||||
* Send a compressed CTM delta to a recipient mailing list by encoding it
|
||||
* Send a compressed CTM delta to a recipient mailing list by encoding it
|
||||
* in safe ASCII characters, in mailer-friendly chunks, and passing it
|
||||
* to sendmail. The encoding is almost the same as MIME BASE64, and is
|
||||
* protected by a simple checksum.
|
||||
*
|
||||
* Author: Stephen McKay
|
||||
*
|
||||
* NOTICE: This is free software. I hope you get some use from this program.
|
||||
* In return you should think about all the nice people who give away software.
|
||||
* Maybe you should write some free software too.
|
||||
* NOTICE: This is free software. I hope you get some use from this program.
|
||||
* In return you should think about all the nice people who give away software.
|
||||
* Maybe you should write some free software too.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -69,7 +69,7 @@ main(int argc, char **argv)
|
|||
err("%s: %s", delta_file, strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
if (max_ctm_size != 0 && sb.st_size > max_ctm_size)
|
||||
apologise(delta_file, sb.st_size, max_ctm_size, mail_alias);
|
||||
else
|
||||
|
|
|
@ -181,7 +181,7 @@ main(argc, argv)
|
|||
badsecttable = spc * dp->d_ncylinders - totsize;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Figure out if disk is large enough for
|
||||
* expanded swap area and 'd', 'e', and 'f'
|
||||
* partitions. Otherwise, use smaller defaults
|
||||
|
|
|
@ -163,7 +163,7 @@ main(argc, argv)
|
|||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
status = 0;
|
||||
for (i = 0; i < argc; ++i) {
|
||||
dp->op_name = name = argv[i];
|
||||
|
|
|
@ -35,7 +35,7 @@ getnumber(void)
|
|||
{
|
||||
int i;
|
||||
char b[80];
|
||||
|
||||
|
||||
fgets(b, 80, stdin);
|
||||
if(b[0] == '\n') return -1;
|
||||
|
||||
|
@ -69,23 +69,23 @@ main(int argc, char **argv)
|
|||
debug = atoi(optarg);
|
||||
settype = 0;
|
||||
break;
|
||||
|
||||
|
||||
case 's':
|
||||
debug = -1;
|
||||
settype = 1;
|
||||
break;
|
||||
|
||||
|
||||
case '?':
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
|
||||
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
if(argc != 1)
|
||||
usage();
|
||||
|
||||
|
||||
if((fd = open(argv[0], 0)) < 0)
|
||||
{
|
||||
perror("open(floppy)");
|
||||
|
@ -101,7 +101,7 @@ main(int argc, char **argv)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if(settype)
|
||||
{
|
||||
if(ioctl(fd, FD_GTYPE, &ft) < 0)
|
||||
|
@ -129,7 +129,7 @@ main(int argc, char **argv)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
/*
|
||||
* FreeBSD:
|
||||
* format a floppy disk
|
||||
*
|
||||
*
|
||||
* Added FD_GTYPE ioctl, verifying, proportional indicators.
|
||||
* Serge Vakulenko, vak@zebub.msk.su
|
||||
* Sat Dec 18 17:45:47 MSK 1993
|
||||
|
@ -98,7 +98,7 @@ verify_track(int fd, int track, int tracksize)
|
|||
fdopts |= FDOPT_NORETRY;
|
||||
(void)ioctl(fd, FD_SOPTS, &fdopts);
|
||||
}
|
||||
|
||||
|
||||
if (bufsz < tracksize) {
|
||||
if (buf)
|
||||
free (buf);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: fdwrite.c,v 1.1.1.1 1994/09/18 07:39:19 phk Exp $
|
||||
* $Id: fdwrite.c,v 1.2 1994/10/14 16:03:33 joerg Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -142,7 +142,7 @@ main(int argc, char **argv)
|
|||
printf("Format: %d cylinders, %d heads, %d sectors, %d bytes = %dkb\n",
|
||||
fdt.tracks,fdt.heads,fdt.sectrac,(1<<fdt.secsize) * 128,
|
||||
fdt.tracks*bpt*fdt.heads/1024);
|
||||
|
||||
|
||||
}
|
||||
memset(trackbuf,0,bpt);
|
||||
for(j=0;inputfd >= 0 && j<bpt;j+=i) {
|
||||
|
|
|
@ -39,8 +39,8 @@ static char copyright[] =
|
|||
|
||||
#ifndef lint
|
||||
/* from: @(#)inetd.c 8.4 (Berkeley) 4/13/94"; */
|
||||
static char inetd_c_rcsid[] =
|
||||
"$Id$";
|
||||
static char inetd_c_rcsid[] =
|
||||
"$Id: inetd.c,v 1.4 1994/12/21 19:08:45 wollman Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
|
@ -58,7 +58,7 @@ static char inetd_c_rcsid[] =
|
|||
* to receive further messages on, or ``take over the socket'',
|
||||
* processing all arriving datagrams and, eventually, timing
|
||||
* out. The first type of server is said to be ``multi-threaded'';
|
||||
* the second type of server ``single-threaded''.
|
||||
* the second type of server ``single-threaded''.
|
||||
*
|
||||
* Inetd uses a configuration file which is read at startup
|
||||
* and, possibly, at some later time in response to a hangup signal.
|
||||
|
@ -460,7 +460,7 @@ main(argc, argv, envp)
|
|||
if (pwd->pw_uid) {
|
||||
if (setgid(pwd->pw_gid) < 0) {
|
||||
syslog(LOG_ERR,
|
||||
"%s: can't set gid %d: %m",
|
||||
"%s: can't set gid %d: %m",
|
||||
sep->se_service, pwd->pw_gid);
|
||||
_exit(1);
|
||||
}
|
||||
|
@ -468,7 +468,7 @@ main(argc, argv, envp)
|
|||
pwd->pw_gid);
|
||||
if (setuid(pwd->pw_uid) < 0) {
|
||||
syslog(LOG_ERR,
|
||||
"%s: can't set uid %d: %m",
|
||||
"%s: can't set uid %d: %m",
|
||||
sep->se_service, pwd->pw_uid);
|
||||
_exit(1);
|
||||
}
|
||||
|
@ -500,7 +500,7 @@ reapchild(signo)
|
|||
if (pid <= 0)
|
||||
break;
|
||||
if (debug)
|
||||
fprintf(stderr, "%d reaped, status %#x\n",
|
||||
fprintf(stderr, "%d reaped, status %#x\n",
|
||||
pid, status);
|
||||
for (sep = servtab; sep; sep = sep->se_next)
|
||||
if (sep->se_wait == pid) {
|
||||
|
@ -550,10 +550,10 @@ config(signo)
|
|||
/*
|
||||
* sep->se_wait may be holding the pid of a daemon
|
||||
* that we're waiting for. If so, don't overwrite
|
||||
* it unless the config file explicitly says don't
|
||||
* it unless the config file explicitly says don't
|
||||
* wait.
|
||||
*/
|
||||
if (cp->se_bi == 0 &&
|
||||
if (cp->se_bi == 0 &&
|
||||
(sep->se_wait == 1 || cp->se_wait == 0))
|
||||
sep->se_wait = cp->se_wait;
|
||||
#define SWAP(a, b) { char *c = a; a = b; b = c; }
|
||||
|
@ -685,7 +685,7 @@ setup(sep)
|
|||
|
||||
if ((sep->se_fd = socket(AF_INET, sep->se_socktype, 0)) < 0) {
|
||||
if (debug)
|
||||
fprintf(stderr, "socket failed on %s/%s: %s\n",
|
||||
fprintf(stderr, "socket failed on %s/%s: %s\n",
|
||||
sep->se_service, sep->se_proto,
|
||||
strerror(errno));
|
||||
syslog(LOG_ERR, "%s/%s: socket: %m",
|
||||
|
@ -719,13 +719,13 @@ setsockopt(fd, SOL_SOCKET, opt, (char *)&on, sizeof (on))
|
|||
if (sep->se_rpc) {
|
||||
int i, len = sizeof(struct sockaddr);
|
||||
|
||||
if (getsockname(sep->se_fd,
|
||||
if (getsockname(sep->se_fd,
|
||||
(struct sockaddr*)&sep->se_ctrladdr, &len) < 0){
|
||||
syslog(LOG_ERR, "%s/%s: getsockname: %m",
|
||||
sep->se_service, sep->se_proto);
|
||||
(void) close(sep->se_fd);
|
||||
sep->se_fd = -1;
|
||||
return;
|
||||
return;
|
||||
}
|
||||
if (debug)
|
||||
print_service("REG ", sep);
|
||||
|
@ -736,7 +736,7 @@ setsockopt(fd, SOL_SOCKET, opt, (char *)&on, sizeof (on))
|
|||
? IPPROTO_UDP : IPPROTO_TCP,
|
||||
ntohs(sep->se_ctrladdr.sin_port));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (sep->se_socktype == SOCK_STREAM)
|
||||
listen(sep->se_fd, 10);
|
||||
|
@ -889,8 +889,8 @@ getconfigent()
|
|||
sep->se_rpc_lowvers;
|
||||
break;
|
||||
default:
|
||||
syslog(LOG_ERR,
|
||||
"bad RPC version specifier; %s\n",
|
||||
syslog(LOG_ERR,
|
||||
"bad RPC version specifier; %s\n",
|
||||
sep->se_service);
|
||||
freeconfig(sep);
|
||||
goto more;
|
||||
|
@ -911,13 +911,13 @@ getconfigent()
|
|||
sep->se_wait = 0;
|
||||
|
||||
if (strcmp(sep->se_proto, "tcp")) {
|
||||
syslog(LOG_ERR,
|
||||
syslog(LOG_ERR,
|
||||
"%s: bad protocol for tcpmux service %s",
|
||||
CONFIG, sep->se_service);
|
||||
goto more;
|
||||
}
|
||||
if (sep->se_socktype != SOCK_STREAM) {
|
||||
syslog(LOG_ERR,
|
||||
syslog(LOG_ERR,
|
||||
"%s: bad socket type for tcpmux service %s",
|
||||
CONFIG, sep->se_service);
|
||||
goto more;
|
||||
|
@ -1055,9 +1055,9 @@ setproctitle(a, s)
|
|||
cp = Argv[0];
|
||||
size = sizeof(sin);
|
||||
if (getpeername(s, (struct sockaddr *)&sin, &size) == 0)
|
||||
(void) sprintf(buf, "-%s [%s]", a, inet_ntoa(sin.sin_addr));
|
||||
(void) sprintf(buf, "-%s [%s]", a, inet_ntoa(sin.sin_addr));
|
||||
else
|
||||
(void) sprintf(buf, "-%s", a);
|
||||
(void) sprintf(buf, "-%s", a);
|
||||
strncpy(cp, buf, LastArg - cp);
|
||||
cp += strlen(cp);
|
||||
while (cp < LastArg)
|
||||
|
@ -1098,7 +1098,7 @@ int check_loop(sin, sep)
|
|||
if (sin->sin_port == se2->se_ctrladdr.sin_port) {
|
||||
syslog(LOG_WARNING,
|
||||
"%s/%s:%s/%s loop request REFUSED from %s",
|
||||
sep->se_service, sep->se_proto,
|
||||
sep->se_service, sep->se_proto,
|
||||
se2->se_service, se2->se_proto,
|
||||
inet_ntoa(sin->sin_addr));
|
||||
return 1;
|
||||
|
@ -1118,7 +1118,7 @@ echo_dg(s, sep) /* Echo service -- echo data back */
|
|||
struct sockaddr_in sin;
|
||||
|
||||
size = sizeof(sin);
|
||||
if ((i = recvfrom(s, buffer, sizeof(buffer), 0,
|
||||
if ((i = recvfrom(s, buffer, sizeof(buffer), 0,
|
||||
(struct sockaddr *)&sin, &size)) < 0)
|
||||
return;
|
||||
|
||||
|
@ -1226,7 +1226,7 @@ chargen_dg(s, sep) /* Character generator */
|
|||
}
|
||||
|
||||
size = sizeof(sin);
|
||||
if (recvfrom(s, text, sizeof(text), 0,
|
||||
if (recvfrom(s, text, sizeof(text), 0,
|
||||
(struct sockaddr *)&sin, &size) < 0)
|
||||
return;
|
||||
|
||||
|
@ -1243,7 +1243,7 @@ chargen_dg(s, sep) /* Character generator */
|
|||
rs = ring;
|
||||
text[LINESIZ] = '\r';
|
||||
text[LINESIZ + 1] = '\n';
|
||||
(void) sendto(s, text, sizeof(text), 0,
|
||||
(void) sendto(s, text, sizeof(text), 0,
|
||||
(struct sockaddr *)&sin, sizeof(sin));
|
||||
}
|
||||
|
||||
|
@ -1293,7 +1293,7 @@ machtime_dg(s, sep)
|
|||
int size;
|
||||
|
||||
size = sizeof(sin);
|
||||
if (recvfrom(s, (char *)&result, sizeof(result), 0,
|
||||
if (recvfrom(s, (char *)&result, sizeof(result), 0,
|
||||
(struct sockaddr *)&sin, &size) < 0)
|
||||
return;
|
||||
|
||||
|
@ -1301,7 +1301,7 @@ machtime_dg(s, sep)
|
|||
return;
|
||||
|
||||
result = machtime();
|
||||
(void) sendto(s, (char *) &result, sizeof(result), 0,
|
||||
(void) sendto(s, (char *) &result, sizeof(result), 0,
|
||||
(struct sockaddr *)&sin, sizeof(sin));
|
||||
}
|
||||
|
||||
|
@ -1334,7 +1334,7 @@ daytime_dg(s, sep) /* Return human-readable time of day */
|
|||
clock = time((time_t *) 0);
|
||||
|
||||
size = sizeof(sin);
|
||||
if (recvfrom(s, buffer, sizeof(buffer), 0,
|
||||
if (recvfrom(s, buffer, sizeof(buffer), 0,
|
||||
(struct sockaddr *)&sin, &size) < 0)
|
||||
return;
|
||||
|
||||
|
@ -1342,7 +1342,7 @@ daytime_dg(s, sep) /* Return human-readable time of day */
|
|||
return;
|
||||
|
||||
(void) sprintf(buffer, "%.24s\r\n", ctime(&clock));
|
||||
(void) sendto(s, buffer, strlen(buffer), 0,
|
||||
(void) sendto(s, buffer, strlen(buffer), 0,
|
||||
(struct sockaddr *)&sin, sizeof(sin));
|
||||
}
|
||||
|
||||
|
@ -1359,10 +1359,10 @@ print_service(action, sep)
|
|||
fprintf(stderr,
|
||||
"%s: %s proto=%s, wait=%d, user=%s builtin=%x server=%s\n",
|
||||
action, sep->se_service, sep->se_proto,
|
||||
sep->se_wait, sep->se_user, (int)sep->se_bi,
|
||||
sep->se_wait, sep->se_user, (int)sep->se_bi,
|
||||
sep->se_server);
|
||||
else
|
||||
fprintf(stderr,
|
||||
fprintf(stderr,
|
||||
"%s: %s proto=%s, wait=%d, user=%s builtin=%x server=%s\n",
|
||||
action, sep->se_service, sep->se_proto,
|
||||
sep->se_wait, sep->se_user, (int)sep->se_bi,
|
||||
|
|
|
@ -364,7 +364,7 @@ dkstats()
|
|||
itime = atime - xtime; /* time not xfer'ing */
|
||||
if (itime < 0)
|
||||
msps = 0;
|
||||
else
|
||||
else
|
||||
msps = itime * 1000 / cur.dk_xfer[dn];
|
||||
} else
|
||||
msps = 0;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: kbdcontrol.c,v 1.4 1995/01/28 22:17:19 sos Exp $
|
||||
* $Id: kbdcontrol.c,v 1.5 1995/01/30 21:41:10 sos Exp $
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
|
@ -36,7 +36,7 @@
|
|||
#include "lex.h"
|
||||
|
||||
char ctrl_names[32][4] = {
|
||||
"nul", "soh", "stx", "etx", "eot", "enq", "ack", "bel",
|
||||
"nul", "soh", "stx", "etx", "eot", "enq", "ack", "bel",
|
||||
"bs ", "ht ", "nl ", "vt ", "ff ", "cr ", "so ", "si ",
|
||||
"dle", "dc1", "dc2", "dc3", "dc4", "nak", "syn", "etb",
|
||||
"can", "em ", "sub", "esc", "fs ", "gs ", "rs ", "ns "
|
||||
|
@ -177,7 +177,7 @@ get_entry()
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
int
|
||||
get_key_definition_line(FILE* fd, keymap_t *map)
|
||||
|
@ -187,7 +187,7 @@ get_key_definition_line(FILE* fd, keymap_t *map)
|
|||
yyin = fd;
|
||||
|
||||
/* get scancode number */
|
||||
if (yylex() != TNUM)
|
||||
if (yylex() != TNUM)
|
||||
return -1;
|
||||
if (number < 0 || number >= NUM_KEYS)
|
||||
return -1;
|
||||
|
@ -210,14 +210,14 @@ get_key_definition_line(FILE* fd, keymap_t *map)
|
|||
}
|
||||
|
||||
|
||||
int
|
||||
int
|
||||
print_entry(FILE *fp, int value)
|
||||
{
|
||||
int val = value & 0xFF;
|
||||
|
||||
switch (value) {
|
||||
case NOP | 0x100:
|
||||
fprintf(fp, " nop ");
|
||||
fprintf(fp, " nop ");
|
||||
break;
|
||||
case LSH | 0x100:
|
||||
fprintf(fp, " lshift");
|
||||
|
@ -269,26 +269,26 @@ print_entry(FILE *fp, int value)
|
|||
break;
|
||||
default:
|
||||
if (value & 0x100) {
|
||||
if (val >= F_FN && val <= L_FN)
|
||||
if (val >= F_FN && val <= L_FN)
|
||||
fprintf(fp, " fkey%02d", val - F_FN + 1);
|
||||
else if (val >= F_SCR && val <= L_SCR)
|
||||
else if (val >= F_SCR && val <= L_SCR)
|
||||
fprintf(fp, " scr%02d ", val - F_SCR + 1);
|
||||
else if (hex)
|
||||
fprintf(fp, " 0x%02x ", val);
|
||||
fprintf(fp, " 0x%02x ", val);
|
||||
else
|
||||
fprintf(fp, " %3d ", val);
|
||||
fprintf(fp, " %3d ", val);
|
||||
}
|
||||
else {
|
||||
if (val < ' ')
|
||||
fprintf(fp, " %s ", ctrl_names[val]);
|
||||
fprintf(fp, " %s ", ctrl_names[val]);
|
||||
else if (val == 127)
|
||||
fprintf(fp, " del ");
|
||||
fprintf(fp, " del ");
|
||||
else if (isprint(val))
|
||||
fprintf(fp, " '%c' ", val);
|
||||
fprintf(fp, " '%c' ", val);
|
||||
else if (hex)
|
||||
fprintf(fp, " 0x%02x ", val);
|
||||
fprintf(fp, " 0x%02x ", val);
|
||||
else
|
||||
fprintf(fp, " %3d ", val);
|
||||
fprintf(fp, " %3d ", val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ print_key_definition_line(FILE *fp, int scancode, struct key_t *key)
|
|||
if (key->spcl & (0x80 >> i))
|
||||
print_entry(fp, key->map[i] | 0x100);
|
||||
else
|
||||
print_entry(fp, key->map[i]);
|
||||
print_entry(fp, key->map[i]);
|
||||
}
|
||||
|
||||
/* print lock state key def */
|
||||
|
@ -327,7 +327,7 @@ print_key_definition_line(FILE *fp, int scancode, struct key_t *key)
|
|||
case 3:
|
||||
fprintf(fp, " B\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -412,7 +412,7 @@ set_functionkey(char *keynumstr, char *string)
|
|||
}
|
||||
fkey.keynum = atoi(keynumstr);
|
||||
if (fkey.keynum < 1 || fkey.keynum > NUM_FKEYS) {
|
||||
fprintf(stderr,
|
||||
fprintf(stderr,
|
||||
"function key number must be between 1 and %d\n",
|
||||
NUM_FKEYS);
|
||||
return;
|
||||
|
@ -434,14 +434,14 @@ set_bell_values(char *opt)
|
|||
{
|
||||
int bell, duration, pitch;
|
||||
|
||||
if (!strcmp(opt, "visual"))
|
||||
if (!strcmp(opt, "visual"))
|
||||
bell = 1, duration = 1, pitch = 800;
|
||||
else if (!strcmp(opt, "normal"))
|
||||
bell = 0, duration = 1, pitch = 800;
|
||||
else {
|
||||
int n;
|
||||
char *v1;
|
||||
|
||||
|
||||
bell = 0;
|
||||
duration = strtol(opt, &v1, 0);
|
||||
if ((duration < 0) || (*v1 != '.'))
|
||||
|
@ -450,7 +450,7 @@ set_bell_values(char *opt)
|
|||
pitch = strtol(opt, &v1, 0);
|
||||
if ((pitch < 0) || (*opt == '\0') || (*v1 != '\0')) {
|
||||
badopt:
|
||||
fprintf(stderr,
|
||||
fprintf(stderr,
|
||||
"argument to -b must be DURATION.PITCH\n");
|
||||
return;
|
||||
}
|
||||
|
@ -489,7 +489,7 @@ struct {
|
|||
repeat = strtol(opt, &v1, 0);
|
||||
if ((repeat < 0) || (*opt == '\0') || (*v1 != '\0')) {
|
||||
badopt:
|
||||
fprintf(stderr,
|
||||
fprintf(stderr,
|
||||
"argument to -r must be delay.repeat\n");
|
||||
return;
|
||||
}
|
||||
|
@ -560,7 +560,7 @@ main(int argc, char **argv)
|
|||
load_keymap(optarg);
|
||||
break;
|
||||
case 'f':
|
||||
set_functionkey(optarg,
|
||||
set_functionkey(optarg,
|
||||
nextarg(argc, argv, &optind, 'f'));
|
||||
break;
|
||||
case 'F':
|
||||
|
|
|
@ -284,7 +284,7 @@ setprof(kvp, state)
|
|||
return;
|
||||
}
|
||||
(void)seteuid(getuid());
|
||||
} else if (kvm_write(kvp->kd, (u_long)&p->state, (void *)&state, sz)
|
||||
} else if (kvm_write(kvp->kd, (u_long)&p->state, (void *)&state, sz)
|
||||
== sz)
|
||||
return;
|
||||
bad:
|
||||
|
|
|
@ -83,7 +83,7 @@ create_knlist(name, db)
|
|||
kfile = name;
|
||||
if ((fd = open(name, O_RDONLY, 0)) < 0)
|
||||
err(1, "%s", name);
|
||||
|
||||
|
||||
fstat(fd,&sst);
|
||||
|
||||
filep = (u_char*)mmap(0, sst.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
|
||||
|
@ -101,7 +101,7 @@ create_knlist(name, db)
|
|||
|
||||
/* Seek to symbol table. */
|
||||
cur_off = N_SYMOFF(*ebuf);
|
||||
|
||||
|
||||
/* Read each symbol and enter it into the database. */
|
||||
nsyms = ebuf->a_syms / sizeof(struct nlist);
|
||||
while (nsyms--) {
|
||||
|
@ -125,7 +125,7 @@ create_knlist(name, db)
|
|||
* XXX
|
||||
* The FreeBSD bootloader loads the kernel at the a_entry address, meaning
|
||||
* that this is where the kernel starts. (not at KERNBASE)
|
||||
*
|
||||
*
|
||||
* This may be introducing an i386 dependency.
|
||||
*/
|
||||
#if defined(__FreeBSD__)
|
||||
|
@ -147,7 +147,7 @@ create_knlist(name, db)
|
|||
voff += N_DATOFF(*ebuf) - N_DATADDR(*ebuf);
|
||||
|
||||
vp = filep + voff;
|
||||
|
||||
|
||||
key.data = (u_char *)VRS_KEY;
|
||||
key.size = sizeof(VRS_KEY) - 1;
|
||||
data.data = vp;
|
||||
|
|
|
@ -221,7 +221,7 @@ getq(namelist)
|
|||
|
||||
/*
|
||||
* Estimate the array size by taking the size of the directory file
|
||||
* and dividing it by a multiple of the minimum size entry.
|
||||
* and dividing it by a multiple of the minimum size entry.
|
||||
*/
|
||||
arraysz = (stbuf.st_size / 24);
|
||||
queue = (struct queue **)malloc(arraysz * sizeof(struct queue *));
|
||||
|
|
|
@ -94,7 +94,7 @@ recvjob()
|
|||
frecverr("unknown printer %s", printer);
|
||||
else if (status == -3)
|
||||
fatal("potential reference loop detected in printcap file");
|
||||
|
||||
|
||||
if (cgetstr(bp, "lf", &LF) == -1)
|
||||
LF = _PATH_CONSOLE;
|
||||
if (cgetstr(bp, "sd", &SD) == -1)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue