diff options
Diffstat (limited to 'usr/src/cmd')
-rw-r--r-- | usr/src/cmd/avs/dscfglockd/dscfglockd.c | 2 | ||||
-rw-r--r-- | usr/src/cmd/format/menu_command.c | 3 | ||||
-rw-r--r-- | usr/src/cmd/fs.d/ufs/mkfs/mkfs.c | 4 | ||||
-rw-r--r-- | usr/src/cmd/mdb/intel/modules/generic_cpu/gcpu.c | 2 | ||||
-rw-r--r-- | usr/src/cmd/scadm/sparc/mpxu/common/smq.c | 11 | ||||
-rw-r--r-- | usr/src/cmd/troff/nroff.d/n6.c | 10 | ||||
-rw-r--r-- | usr/src/cmd/troff/troff.d/t6.c | 26 | ||||
-rw-r--r-- | usr/src/cmd/vi/port/ex.c | 4 | ||||
-rw-r--r-- | usr/src/cmd/vi/port/ex.h | 22 | ||||
-rw-r--r-- | usr/src/cmd/vi/port/ex_subr.c | 42 |
10 files changed, 37 insertions, 89 deletions
diff --git a/usr/src/cmd/avs/dscfglockd/dscfglockd.c b/usr/src/cmd/avs/dscfglockd/dscfglockd.c index f4fe71937a..578c38f15e 100644 --- a/usr/src/cmd/avs/dscfglockd/dscfglockd.c +++ b/usr/src/cmd/avs/dscfglockd/dscfglockd.c @@ -631,8 +631,6 @@ lock_stat() struct lockdaemon *ldp; int i; - spcs_log("cfglockd", NULL, - "%s, Lock daemon built %s **********", program, __DATE__); switch (the_lock.type) { case LOCK_NOTLOCKED: lt = "not locked"; diff --git a/usr/src/cmd/format/menu_command.c b/usr/src/cmd/format/menu_command.c index 6c77b086cf..0f5246a9c6 100644 --- a/usr/src/cmd/format/menu_command.c +++ b/usr/src/cmd/format/menu_command.c @@ -21,6 +21,7 @@ /* * Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2012 Milan Jurik. All rights reserved. + * Copyright 2014 Toomas Soome <tsoome@me.com> */ /* @@ -79,6 +80,8 @@ slist_t ptag_choices[] = { { "home", "", V_HOME }, { "alternates", "", V_ALTSCTR }, { "reserved", "", V_RESERVED }, + { "system", "", V_SYSTEM }, + { "BIOS_boot", "", V_BIOS_BOOT }, { NULL } }; diff --git a/usr/src/cmd/fs.d/ufs/mkfs/mkfs.c b/usr/src/cmd/fs.d/ufs/mkfs/mkfs.c index 4fa2683a64..7d77e7a8b9 100644 --- a/usr/src/cmd/fs.d/ufs/mkfs/mkfs.c +++ b/usr/src/cmd/fs.d/ufs/mkfs/mkfs.c @@ -2810,7 +2810,7 @@ fsinit() bcopy(&lost_found_dir[2], &buf[i], DIRSIZ(&lost_found_dir[2])); } node.i_number = LOSTFOUNDINO; - node.i_smode = node.i_mode = IFDIR | 0700; + node.i_smode = IFDIR | 0700; node.i_nlink = 2; node.i_size = sblock.fs_bsize; node.i_db[0] = alloc((int)node.i_size, node.i_mode); @@ -2823,7 +2823,7 @@ fsinit() * create the root directory */ node.i_number = UFSROOTINO; - node.i_mode = node.i_smode = IFDIR | UMASK; + node.i_mode = IFDIR | UMASK; node.i_nlink = PREDEFDIR; node.i_size = makedir(root_dir, PREDEFDIR); node.i_db[0] = alloc(sblock.fs_fsize, node.i_mode); diff --git a/usr/src/cmd/mdb/intel/modules/generic_cpu/gcpu.c b/usr/src/cmd/mdb/intel/modules/generic_cpu/gcpu.c index b097bba3f7..b43bfa236d 100644 --- a/usr/src/cmd/mdb/intel/modules/generic_cpu/gcpu.c +++ b/usr/src/cmd/mdb/intel/modules/generic_cpu/gcpu.c @@ -127,7 +127,7 @@ cmih_ent_next(struct cmih_walk_state *wsp) return (B_TRUE); /* increment the chip id */ - wsp->chipid = ++wsp->chipid & (CMI_MAX_CHIPID); + wsp->chipid = (wsp->chipid + 1) & (CMI_MAX_CHIPID); return (B_TRUE); } diff --git a/usr/src/cmd/scadm/sparc/mpxu/common/smq.c b/usr/src/cmd/scadm/sparc/mpxu/common/smq.c index ef267cc9f4..7e3434157a 100644 --- a/usr/src/cmd/scadm/sparc/mpxu/common/smq.c +++ b/usr/src/cmd/scadm/sparc/mpxu/common/smq.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * smq.c: to provide a message queue system for scadm functions (used in the * firmware download context where BP messages, received from the service @@ -91,8 +89,7 @@ smq_receive(smq_t *smq, smq_msg_t *msg) /* Copy messaged into queue */ *msg = *smq->smq_head; - /* Increment Head */ - smq->smq_head = smq->smq_head++; + smq->smq_head++; if ((unsigned long)smq->smq_head > ((unsigned long)smq->smq_msgBuffer + (unsigned long)(smq->smq_depth * sizeof (smq_msg_t)))) { smq->smq_head = smq->smq_msgBuffer; @@ -115,8 +112,7 @@ smq_send(smq_t *smq, smq_msg_t *msg) /* Copy messaged into queue */ *smq->smq_tail = *msg; - /* Increment Tail */ - smq->smq_tail = smq->smq_tail++; + smq->smq_tail++; if ((unsigned long)smq->smq_tail > ((unsigned long)smq->smq_msgBuffer + (unsigned long)(smq->smq_depth * sizeof (smq_msg_t)))) { smq->smq_tail = smq->smq_msgBuffer; @@ -175,8 +171,7 @@ smq_xreceive(smq_t *smq, timestruc_t *timeout, smq_msg_t *msg) /* Copy messaged into queue */ *msg = *smq->smq_head; - /* Increment Head */ - smq->smq_head = smq->smq_head++; + smq->smq_head++; if ((unsigned long)smq->smq_head > ((unsigned long)smq->smq_msgBuffer + (unsigned long)(smq->smq_depth * sizeof (smq_msg_t)))) { smq->smq_head = smq->smq_msgBuffer; diff --git a/usr/src/cmd/troff/nroff.d/n6.c b/usr/src/cmd/troff/nroff.d/n6.c index ed6c394ff8..4098b23d69 100644 --- a/usr/src/cmd/troff/nroff.d/n6.c +++ b/usr/src/cmd/troff/nroff.d/n6.c @@ -37,8 +37,6 @@ * contributors. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "tdef.h" #include "tw.h" #include "ext.h" @@ -244,7 +242,7 @@ int a; if (a) i = getrq(); - else + else i = getsn(); if (!i || i == 'P') { j = font1; @@ -271,7 +269,7 @@ setwd() int delim, emsz, k; int savhp, savapts, savapts1, savfont, savfont1, savpts, savpts1; - base = numtab[ST].val = numtab[ST].val = wid = numtab[CT].val = 0; + base = numtab[ST].val = wid = numtab[CT].val = 0; if (ismot(i = getch())) return (0); delim = cbits(i); @@ -296,7 +294,7 @@ setwd() k = -k; base -= k; emsz = 0; - } else + } else continue; if (base < numtab[SB].val) numtab[SB].val = base; @@ -434,7 +432,7 @@ bd0: if (skip() || !(i = getrq()) || (j = findft(i)) == -1) { if (k) goto bd1; - else + else return (0); } if (j == smnt) { diff --git a/usr/src/cmd/troff/troff.d/t6.c b/usr/src/cmd/troff/troff.d/t6.c index 771a01d9e3..3ce029c945 100644 --- a/usr/src/cmd/troff/troff.d/t6.c +++ b/usr/src/cmd/troff/troff.d/t6.c @@ -37,11 +37,9 @@ * contributors. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * t6.c - * + * * width functions, sizes and fonts */ @@ -98,7 +96,7 @@ tchar j; if (sfbits(j) == oldbits) { xfont = pfont; xpts = ppts; - } else + } else xbits(j, 0); if (widcache[i-32].fontpts == (xfont<<8) + xpts && !setwdf) k = widcache[i-32].width; @@ -186,8 +184,8 @@ int i; if (cs = cstab[xfont]) { nocache = 1; if (ccs = ccstab[xfont]) - x = ccs; - else + x = ccs; + else x = xpts; cs = (cs * EMPTS(x)) / 36; } @@ -472,7 +470,7 @@ int a; if (a) i = getrq(); - else + else i = getsn(); if (!i || i == 'P') { j = font1; @@ -500,7 +498,7 @@ setwd() int delim, emsz, k; int savhp, savapts, savapts1, savfont, savfont1, savpts, savpts1; - base = numtab[ST].val = numtab[ST].val = wid = numtab[CT].val = 0; + base = numtab[ST].val = wid = numtab[CT].val = 0; if (ismot(i = getch())) return (0); delim = cbits(i); @@ -525,7 +523,7 @@ setwd() k = -k; base -= k; emsz = 0; - } else + } else continue; if (base < numtab[SB].val) numtab[SB].val = base; @@ -640,7 +638,7 @@ tchar i; *pbp++ = k; j = LIG_FF; } - } else + } else j = LIG_FF; } else { *pbp++ = j; @@ -718,8 +716,8 @@ char *truename; fontbase[pos]->nwfont = n; /* so can load a larger one again later */ close(k); if (pos == smnt) { - smnt = 0; - sbold = 0; + smnt = 0; + sbold = 0; } if ((fontlab[pos] = f) == 'S') smnt = pos; @@ -776,7 +774,7 @@ bd0: if (skip() || !(i = getrq()) || (j = findft(i)) == -1) { if (k) goto bd1; - else + else return (0); } if (j == smnt) { @@ -810,7 +808,7 @@ casevs() i = inumb(&lss); if (nonumb) i = lss1; - if (i < VERT) + if (i < VERT) i = VERT; lss1 = lss; lss = i; diff --git a/usr/src/cmd/vi/port/ex.c b/usr/src/cmd/vi/port/ex.c index 786242c21d..5475c23a2b 100644 --- a/usr/src/cmd/vi/port/ex.c +++ b/usr/src/cmd/vi/port/ex.c @@ -28,8 +28,6 @@ /* Copyright (c) 1981 Regents of the University of California */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "ex.h" #include "ex_argv.h" #include "ex_temp.h" @@ -241,8 +239,6 @@ main(int ac, char *av[]) ruptible = signal(SIGINT, SIG_IGN) == SIG_DFL; if (signal(SIGTERM, SIG_IGN) == SIG_DFL) signal(SIGTERM, onhup); - if (signal(SIGEMT, SIG_IGN) == SIG_DFL) - signal(SIGEMT, onemt); signal(SIGILL, oncore); signal(SIGTRAP, oncore); signal(SIGIOT, oncore); diff --git a/usr/src/cmd/vi/port/ex.h b/usr/src/cmd/vi/port/ex.h index 820937be46..65dc0edd01 100644 --- a/usr/src/cmd/vi/port/ex.h +++ b/usr/src/cmd/vi/port/ex.h @@ -366,8 +366,8 @@ var line *undadot; /* If we saved all lines, dot reverts here */ var int xflag; /* True if we are in encryption mode */ var int xtflag; /* True if the temp file is being encrypted */ var int kflag; /* True if the key has been accepted */ -var int crflag; /* True if the key has been accepted and the file - being read is ciphertext +var int crflag; /* True if the key has been accepted and the file + being read is ciphertext */ var int perm[2]; /* pipe connection to crypt for file being edited */ var int tperm[2]; /* pipe connection to crypt for temporary file */ @@ -379,7 +379,7 @@ char *getpass(); var bool write_quit; /* True if executing a 'wq' command */ var int errcnt; /* number of error/warning messages in */ - /* editing session (global flag) */ + /* editing session (global flag) */ /* * Function type definitions */ @@ -440,10 +440,9 @@ int normchar(wchar_t); int normline(void); int numbline(int); var void (*oldquit)(); -#ifdef __STDC__ + void onhup(int); void onintr(int); -void onemt(int); void oncore(int); #ifdef CBREAK void vintr(int); @@ -452,19 +451,6 @@ void onsusp(int); int putch(char); int plodput(char); int vputch(char); -#else -void onhup(); -void onintr(); -void onemt(); -void oncore(); -#ifdef CBREAK -void vintr(); -#endif -void onsusp(); -int putch(); -int plodput(); -int vputch(); -#endif /* __STDC__ */ void shift(int, int); int termchar(wchar_t); diff --git a/usr/src/cmd/vi/port/ex_subr.c b/usr/src/cmd/vi/port/ex_subr.c index ea3f4b3929..c920d55853 100644 --- a/usr/src/cmd/vi/port/ex_subr.c +++ b/usr/src/cmd/vi/port/ex_subr.c @@ -224,7 +224,7 @@ getmark(c) int c; { line *addr; - + for (addr = one; addr <= dol; addr++) if (names[c - 'a'] == (*addr &~ 01)) { return (addr); @@ -576,7 +576,7 @@ qcolumn(unsigned char *lim, unsigned char *gp) length = mbtowc(&wchar, (char *)lim, MULTI_BYTE_MAX); if(length < 0) length = 1; - x = lim[length]; + x = lim[length]; lim[length] = 0; } pline(0); @@ -622,7 +622,7 @@ nqcolumn(unsigned char *lim, unsigned char *gp) length = mbtowc(&wchar, (char *)lim, MULTI_BYTE_MAX); if(length < 0) length = 1; - x = lim[length]; + x = lim[length]; lim[length] = 0; } pline(0); @@ -924,32 +924,6 @@ markit(line *addr) } /* - * The following code is defensive programming against a bug in the - * pdp-11 overlay implementation. Sometimes it goes nuts and asks - * for an overlay with some garbage number, which generates an emt - * trap. This is a less than elegant solution, but it is somewhat - * better than core dumping and losing your work, leaving your tty - * in a weird state, etc. - */ -int _ovno; - -/*ARGSUSED*/ -void -onemt(sig) -int sig; -{ - int oovno; - - signal(SIGEMT, onemt); - oovno = _ovno; - /* 2 and 3 are valid on 11/40 type vi, so */ - if (_ovno < 0 || _ovno > 3) - _ovno = 0; - error(value(vi_TERSE) ? gettext("emt trap, _ovno is %d ") : -gettext("emt trap, _ovno is %d - try again")); -} - -/* * When a hangup occurs our actions are similar to a preserve * command. If the buffer has not been [Modified], then we do * nothing but remove the temporary files and exit. @@ -961,7 +935,7 @@ gettext("emt trap, _ovno is %d - try again")); */ /*ARGSUSED*/ -void +void onhup(sig) int sig; { @@ -1034,7 +1008,7 @@ int sig; */ /*ARGSUSED*/ -void +void onintr(sig) int sig; { @@ -1123,7 +1097,7 @@ void exit(i) extern void redraw(); /*ARGSUSED*/ -void +void onsusp(sig) int sig; { @@ -1161,7 +1135,7 @@ int sig; vdirty(0, lines); if (sig) vrepaint(cursor); - } + } } #endif @@ -1195,7 +1169,7 @@ unsigned char *linebuf, *cursor; ccursor += length; } return(ocursor); -} +} int ixlatctl(int flag) |