OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
minor disklabel cleanup

From: Ted Unangst (ted.unangstgmail.com)
Date: Wed Aug 11 2010 - 18:45:41 CDT


Noticed this on a previous commit, just before lock.

Index: disklabel.c
===================================================================
RCS file: /cvs/src/sbin/disklabel/disklabel.c,v
retrieving revision 1.170
diff -u -r1.170 disklabel.c
--- disklabel.c 8 Aug 2010 05:24:46 -0000 1.170
+++ disklabel.c 11 Aug 2010 23:44:58 -0000
-115,8 +115,6
 int cmplabel(struct disklabel *, struct disklabel *);
 void usage(void);
 u_int64_t getnum(char *, u_int64_t, u_int64_t, const char **);
-void uid_print(FILE *, struct disklabel *);
-int uid_parse(struct disklabel *, char *);
 
 int
 main(int argc, char *argv[])
-597,7 +595,6
 makedisktab(FILE *f, struct disklabel *lp)
 {
         int i;
- char *did = "\\\n\t:";
         struct partition *pp;
 
         if (lp->d_packname[0])
Index: editor.c
===================================================================
RCS file: /cvs/src/sbin/disklabel/editor.c,v
retrieving revision 1.243
diff -u -r1.243 editor.c
--- editor.c 10 Aug 2010 23:35:08 -0000 1.243
+++ editor.c 11 Aug 2010 23:45:00 -0000
-1616,7 +1616,6
 void
 set_uid(struct disklabel *lp)
 {
- u_int uid[8];
         char *s;
         int i;
 
-1836,7 +1835,7
         /* Sort mountpoints so we don't try to mount /usr/local before /usr */
         qsort((void *)mi, MAXPARTITIONS, sizeof(struct mountinfo), micmp);
 
- if (fp = fopen(fstabfile, "w")) {
+ if ((fp = fopen(fstabfile, "w"))) {
                 for (i = 0; i < MAXPARTITIONS && mi[i].mountpoint; i++) {
                         j = mi[i].partno;
                         fprintf(fp, "%s%c %s %s rw 1 %d\n", bdev, 'a' + j,
Index: extern.h
===================================================================
RCS file: /cvs/src/sbin/disklabel/extern.h,v
retrieving revision 1.18
diff -u -r1.18 extern.h
--- extern.h 7 Aug 2009 00:26:34 -0000 1.18
+++ extern.h 11 Aug 2010 23:45:00 -0000
-25,6 +25,8
 double scale(u_int64_t, char, struct disklabel *);
 void display(FILE *, struct disklabel *, char, int);
 void display_partition(FILE *, struct disklabel *, int, char);
+void uid_print(FILE *, struct disklabel *);
+int uid_parse(struct disklabel *, char *);
 
 void readlabel(int);
 struct disklabel *makebootarea(char *, struct disklabel *, int);