aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-02-16 13:18:17 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-02-16 13:18:17 +0000
commit284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9 (patch)
tree3cfcea06c5a5c9e454edd39b58111ef38810882c
parent069e347863fa46f684ab6bd7e48cefd8fa74b629 (diff)
downloadbusybox-w32-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.tar.gz
busybox-w32-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.tar.bz2
busybox-w32-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.zip
random s/short/int/
add_cmd 1189 1190 +1 xconnect_ftpdata 118 117 -1 data_align 86 84 -2 process_files 2101 2096 -5 forkexec 1345 1334 -11
-rw-r--r--archival/libunarchive/data_align.c6
-rw-r--r--archival/tar.c9
-rw-r--r--coreutils/Kbuild1
-rw-r--r--editors/sed.c10
-rw-r--r--include/libbb.h4
-rw-r--r--include/unarchive.h2
-rw-r--r--miscutils/hdparm.c2
-rw-r--r--networking/ftpgetput.c2
-rw-r--r--networking/httpd.c5
-rw-r--r--networking/libiproute/ll_proto.c4
-rw-r--r--networking/libiproute/utils.h4
-rw-r--r--shell/hush.c2
-rw-r--r--shell/msh.c8
-rw-r--r--util-linux/fdisk_aix.c4
-rw-r--r--util-linux/fdisk_sgi.c21
-rw-r--r--util-linux/ipcrm.c2
-rw-r--r--util-linux/ipcs.c2
17 files changed, 46 insertions, 42 deletions
diff --git a/archival/libunarchive/data_align.c b/archival/libunarchive/data_align.c
index 9803199e0..d98dc5764 100644
--- a/archival/libunarchive/data_align.c
+++ b/archival/libunarchive/data_align.c
@@ -3,14 +3,12 @@
3 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 3 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
4 */ 4 */
5 5
6//#include <sys/types.h>
7
8#include "libbb.h" 6#include "libbb.h"
9#include "unarchive.h" 7#include "unarchive.h"
10 8
11void data_align(archive_handle_t *archive_handle, const unsigned short boundary) 9void data_align(archive_handle_t *archive_handle, unsigned boundary)
12{ 10{
13 const unsigned short skip_amount = (boundary - (archive_handle->offset % boundary)) % boundary; 11 unsigned skip_amount = (boundary - (archive_handle->offset % boundary)) % boundary;
14 12
15 archive_handle->seek(archive_handle, skip_amount); 13 archive_handle->seek(archive_handle, skip_amount);
16 archive_handle->offset += skip_amount; 14 archive_handle->offset += skip_amount;
diff --git a/archival/tar.c b/archival/tar.c
index 6b3738365..a8ff7b894 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -546,13 +546,16 @@ static int writeTarFile(const int tar_fd, const int verboseFlag,
546 546
547 if (gzipPid == 0) { 547 if (gzipPid == 0) {
548 /* child */ 548 /* child */
549 xmove_fd(tbInfo.tarFd, 1); 549 /* NB: close _first_, then move fds! */
550 xmove_fd(gzipDataPipe.rd, 0);
551 close(gzipDataPipe.wr); 550 close(gzipDataPipe.wr);
552#if WAIT_FOR_CHILD 551#if WAIT_FOR_CHILD
553 close(gzipStatusPipe.rd); 552 close(gzipStatusPipe.rd);
553 /* gzipStatusPipe.wr will close only on exec -
554 * parent waits for this close to happen */
554 fcntl(gzipStatusPipe.wr, F_SETFD, FD_CLOEXEC); 555 fcntl(gzipStatusPipe.wr, F_SETFD, FD_CLOEXEC);
555#endif 556#endif
557 xmove_fd(gzipDataPipe.rd, 0);
558 xmove_fd(tbInfo.tarFd, 1);
556 /* exec gzip/bzip2 program/applet */ 559 /* exec gzip/bzip2 program/applet */
557 BB_EXECLP(zip_exec, zip_exec, "-f", NULL); 560 BB_EXECLP(zip_exec, zip_exec, "-f", NULL);
558 vfork_exec_errno = errno; 561 vfork_exec_errno = errno;
@@ -570,7 +573,7 @@ static int writeTarFile(const int tar_fd, const int verboseFlag,
570 573
571 /* Wait until child execs (or fails to) */ 574 /* Wait until child execs (or fails to) */
572 n = full_read(gzipStatusPipe.rd, &buf, 1); 575 n = full_read(gzipStatusPipe.rd, &buf, 1);
573 if ((n < 0) && (/*errno == EAGAIN ||*/ errno == EINTR)) 576 if (n < 0 /* && errno == EAGAIN */)
574 continue; /* try it again */ 577 continue; /* try it again */
575 578
576 } 579 }
diff --git a/coreutils/Kbuild b/coreutils/Kbuild
index 8ada8b056..b9ed0d79e 100644
--- a/coreutils/Kbuild
+++ b/coreutils/Kbuild
@@ -12,6 +12,7 @@ lib-$(CONFIG_CAL) += cal.o
12lib-$(CONFIG_CAT) += cat.o 12lib-$(CONFIG_CAT) += cat.o
13lib-$(CONFIG_MORE) += cat.o # more uses it if stdout isn't a tty 13lib-$(CONFIG_MORE) += cat.o # more uses it if stdout isn't a tty
14lib-$(CONFIG_LESS) += cat.o # less too 14lib-$(CONFIG_LESS) += cat.o # less too
15lib-$(CONFIG_CRONTAB) += cat.o # crontab -l
15lib-$(CONFIG_CATV) += catv.o 16lib-$(CONFIG_CATV) += catv.o
16lib-$(CONFIG_CHGRP) += chgrp.o chown.o 17lib-$(CONFIG_CHGRP) += chgrp.o chown.o
17lib-$(CONFIG_CHMOD) += chmod.o 18lib-$(CONFIG_CHMOD) += chmod.o
diff --git a/editors/sed.c b/editors/sed.c
index 0f5cab2b7..433418253 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -76,7 +76,7 @@ typedef struct sed_cmd_s {
76 FILE *sw_file; /* File (sw) command writes to, -1 for none. */ 76 FILE *sw_file; /* File (sw) command writes to, -1 for none. */
77 char *string; /* Data string for (saicytb) commands. */ 77 char *string; /* Data string for (saicytb) commands. */
78 78
79 unsigned short which_match; /* (s) Which match to replace (0 for all) */ 79 unsigned which_match; /* (s) Which match to replace (0 for all) */
80 80
81 /* Bitfields (gcc won't group them if we don't) */ 81 /* Bitfields (gcc won't group them if we don't) */
82 unsigned invert:1; /* the '!' after the address */ 82 unsigned invert:1; /* the '!' after the address */
@@ -353,7 +353,7 @@ static int parse_subst_cmd(sed_cmd_t *sed_cmd, const char *substr)
353 /* Match 0 treated as all, multiple matches we take the last one. */ 353 /* Match 0 treated as all, multiple matches we take the last one. */
354 const char *pos = substr + idx; 354 const char *pos = substr + idx;
355/* FIXME: error check? */ 355/* FIXME: error check? */
356 sed_cmd->which_match = (unsigned short)strtol(substr+idx, (char**) &pos, 10); 356 sed_cmd->which_match = (unsigned)strtol(substr+idx, (char**) &pos, 10);
357 idx = pos - substr; 357 idx = pos - substr;
358 } 358 }
359 continue; 359 continue;
@@ -364,7 +364,8 @@ static int parse_subst_cmd(sed_cmd_t *sed_cmd, const char *substr)
364 switch (substr[idx]) { 364 switch (substr[idx]) {
365 /* Replace all occurrences */ 365 /* Replace all occurrences */
366 case 'g': 366 case 'g':
367 if (match[0] != '^') sed_cmd->which_match = 0; 367 if (match[0] != '^')
368 sed_cmd->which_match = 0;
368 break; 369 break;
369 /* Print pattern space */ 370 /* Print pattern space */
370 case 'p': 371 case 'p':
@@ -683,7 +684,8 @@ static int do_subst_command(sed_cmd_t *sed_cmd, char **line)
683 altered++; 684 altered++;
684 685
685 /* if we're not doing this globally, get out now */ 686 /* if we're not doing this globally, get out now */
686 if (sed_cmd->which_match) break; 687 if (sed_cmd->which_match)
688 break;
687 } while (*oldline && (regexec(current_regex, oldline, 10, G.regmatch, 0) != REG_NOMATCH)); 689 } while (*oldline && (regexec(current_regex, oldline, 10, G.regmatch, 0) != REG_NOMATCH));
688 690
689 /* Copy rest of string into output pipeline */ 691 /* Copy rest of string into output pipeline */
diff --git a/include/libbb.h b/include/libbb.h
index b405df541..3175c8e7f 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -595,14 +595,14 @@ int bb_execvp(const char *file, char *const argv[]);
595pid_t spawn(char **argv); 595pid_t spawn(char **argv);
596pid_t xspawn(char **argv); 596pid_t xspawn(char **argv);
597 597
598/* Unlike waitpid, waits ONLY for one process, 598int safe_waitpid(int pid, int *wstat, int options);
599/* Unlike waitpid, waits ONLY for one process.
599 * It's safe to pass negative 'pids' from failed [v]fork - 600 * It's safe to pass negative 'pids' from failed [v]fork -
600 * wait4pid will return -1 (and will not clobber [v]fork's errno). 601 * wait4pid will return -1 (and will not clobber [v]fork's errno).
601 * IOW: rc = wait4pid(spawn(argv)); 602 * IOW: rc = wait4pid(spawn(argv));
602 * if (rc < 0) bb_perror_msg("%s", argv[0]); 603 * if (rc < 0) bb_perror_msg("%s", argv[0]);
603 * if (rc > 0) bb_error_msg("exit code: %d", rc); 604 * if (rc > 0) bb_error_msg("exit code: %d", rc);
604 */ 605 */
605int safe_waitpid(int pid, int *wstat, int options);
606int wait4pid(int pid); 606int wait4pid(int pid);
607int wait_any_nohang(int *wstat); 607int wait_any_nohang(int *wstat);
608#define wait_crashed(w) ((w) & 127) 608#define wait_crashed(w) ((w) & 127)
diff --git a/include/unarchive.h b/include/unarchive.h
index 4ed2ccd0c..8b76217b4 100644
--- a/include/unarchive.h
+++ b/include/unarchive.h
@@ -97,7 +97,7 @@ extern void seek_by_read(const archive_handle_t *archive_handle, const unsigned
97 97
98extern ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, unsigned char *buf, size_t count); 98extern ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, unsigned char *buf, size_t count);
99 99
100extern void data_align(archive_handle_t *archive_handle, const unsigned short boundary); 100extern void data_align(archive_handle_t *archive_handle, unsigned boundary);
101extern const llist_t *find_list_entry(const llist_t *list, const char *filename); 101extern const llist_t *find_list_entry(const llist_t *list, const char *filename);
102extern const llist_t *find_list_entry2(const llist_t *list, const char *filename); 102extern const llist_t *find_list_entry2(const llist_t *list, const char *filename);
103 103
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index bacbe05a2..0aaff45f2 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -1168,7 +1168,7 @@ static const char BuffType[] ALIGN1 =
1168static void dump_identity(const struct hd_driveid *id) 1168static void dump_identity(const struct hd_driveid *id)
1169{ 1169{
1170 int i; 1170 int i;
1171 const unsigned short int *id_regs = (const void*) id; 1171 const unsigned short *id_regs = (const void*) id;
1172 1172
1173 printf("\n Model=%.40s, FwRev=%.8s, SerialNo=%.20s\n Config={", 1173 printf("\n Model=%.40s, FwRev=%.8s, SerialNo=%.20s\n Config={",
1174 id->model, id->fw_rev, id->serial_no); 1174 id->model, id->fw_rev, id->serial_no);
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c
index de11f912e..91f6fcd0d 100644
--- a/networking/ftpgetput.c
+++ b/networking/ftpgetput.c
@@ -72,7 +72,7 @@ static int ftpcmd(const char *s1, const char *s2, FILE *stream, char *buf)
72static int xconnect_ftpdata(ftp_host_info_t *server, char *buf) 72static int xconnect_ftpdata(ftp_host_info_t *server, char *buf)
73{ 73{
74 char *buf_ptr; 74 char *buf_ptr;
75 unsigned short port_num; 75 unsigned port_num;
76 76
77 /* Response is "NNN garbageN1,N2,N3,N4,P1,P2[)garbage] 77 /* Response is "NNN garbageN1,N2,N3,N4,P1,P2[)garbage]
78 * Server's IP is N1.N2.N3.N4 (we ignore it) 78 * Server's IP is N1.N2.N3.N4 (we ignore it)
diff --git a/networking/httpd.c b/networking/httpd.c
index 779f070d9..1ac49e7a2 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -1409,10 +1409,11 @@ static void send_cgi_and_exit(
1409 /* Child process */ 1409 /* Child process */
1410 xfunc_error_retval = 242; 1410 xfunc_error_retval = 242;
1411 1411
1412 /* NB: close _first_, then move fds! */
1413 close(toCgi.wr);
1414 close(fromCgi.rd);
1412 xmove_fd(toCgi.rd, 0); /* replace stdin with the pipe */ 1415 xmove_fd(toCgi.rd, 0); /* replace stdin with the pipe */
1413 xmove_fd(fromCgi.wr, 1); /* replace stdout with the pipe */ 1416 xmove_fd(fromCgi.wr, 1); /* replace stdout with the pipe */
1414 close(fromCgi.rd);
1415 close(toCgi.wr);
1416 /* User seeing stderr output can be a security problem. 1417 /* User seeing stderr output can be a security problem.
1417 * If CGI really wants that, it can always do dup itself. */ 1418 * If CGI really wants that, it can always do dup itself. */
1418 /* dup2(1, 2); */ 1419 /* dup2(1, 2); */
diff --git a/networking/libiproute/ll_proto.c b/networking/libiproute/ll_proto.c
index 6933ce239..62262c9c2 100644
--- a/networking/libiproute/ll_proto.c
+++ b/networking/libiproute/ll_proto.c
@@ -102,7 +102,7 @@ const char *ll_proto_n2a(unsigned short id, char *buf, int len)
102 102
103 id = ntohs(id); 103 id = ntohs(id);
104 104
105 for (i=0; i < ARRAY_SIZE(llproto_names); i++) { 105 for (i = 0; i < ARRAY_SIZE(llproto_names); i++) {
106 if (llproto_names[i].id == id) 106 if (llproto_names[i].id == id)
107 return llproto_names[i].name; 107 return llproto_names[i].name;
108 } 108 }
@@ -113,7 +113,7 @@ const char *ll_proto_n2a(unsigned short id, char *buf, int len)
113int ll_proto_a2n(unsigned short *id, char *buf) 113int ll_proto_a2n(unsigned short *id, char *buf)
114{ 114{
115 int i; 115 int i;
116 for (i=0; i < ARRAY_SIZE(llproto_names); i++) { 116 for (i = 0; i < ARRAY_SIZE(llproto_names); i++) {
117 if (strcasecmp(llproto_names[i].name, buf) == 0) { 117 if (strcasecmp(llproto_names[i].name, buf) == 0) {
118 *id = htons(llproto_names[i].id); 118 *id = htons(llproto_names[i].id);
119 return 0; 119 return 0;
diff --git a/networking/libiproute/utils.h b/networking/libiproute/utils.h
index cd650492d..50a6c2026 100644
--- a/networking/libiproute/utils.h
+++ b/networking/libiproute/utils.h
@@ -42,8 +42,8 @@ typedef struct
42#endif 42#endif
43 43
44struct dn_naddr { 44struct dn_naddr {
45 unsigned short a_len; 45 unsigned short a_len;
46 unsigned char a_addr[DN_MAXADDL]; 46 unsigned char a_addr[DN_MAXADDL];
47}; 47};
48 48
49#define IPX_NODE_LEN 6 49#define IPX_NODE_LEN 6
diff --git a/shell/hush.c b/shell/hush.c
index 3f4610391..8afa15e89 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -3243,7 +3243,7 @@ static FILE *generate_stream_from_list(struct pipe *head)
3243 if (pid == 0) { /* child */ 3243 if (pid == 0) { /* child */
3244 if (ENABLE_HUSH_JOB) 3244 if (ENABLE_HUSH_JOB)
3245 die_sleep = 0; /* let nofork's xfuncs die */ 3245 die_sleep = 0; /* let nofork's xfuncs die */
3246 close(channel[0]); 3246 close(channel[0]); /* NB: close _first_, then move fd! */
3247 xmove_fd(channel[1], 1); 3247 xmove_fd(channel[1], 1);
3248 /* Prevent it from trying to handle ctrl-z etc */ 3248 /* Prevent it from trying to handle ctrl-z etc */
3249#if ENABLE_HUSH_JOB 3249#if ENABLE_HUSH_JOB
diff --git a/shell/msh.c b/shell/msh.c
index 65556043d..fd287f16e 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -2797,15 +2797,13 @@ static int forkexec(struct op *t, int *pin, int *pout, int no_fork, char **wp)
2797 if (!bltin) 2797 if (!bltin)
2798 export(lookup(cp)); 2798 export(lookup(cp));
2799 2799
2800 if (pin) { 2800 if (pin) { /* NB: close _first_, then move fds! */
2801 close(pin[1]);
2801 xmove_fd(pin[0], 0); 2802 xmove_fd(pin[0], 0);
2802 if (pin[1] != 0)
2803 close(pin[1]);
2804 } 2803 }
2805 if (pout) { 2804 if (pout) {
2805 close(pout[0]);
2806 xmove_fd(pout[1], 1); 2806 xmove_fd(pout[1], 1);
2807 if (pout[0] > 1)
2808 close(pout[0]);
2809 } 2807 }
2810 2808
2811 iopp = t->ioact; 2809 iopp = t->ioact;
diff --git a/util-linux/fdisk_aix.c b/util-linux/fdisk_aix.c
index 69aef97f5..0b9fa2be9 100644
--- a/util-linux/fdisk_aix.c
+++ b/util-linux/fdisk_aix.c
@@ -29,8 +29,8 @@ typedef struct {
29 * Some fixes 29 * Some fixes
30*/ 30*/
31 31
32static int aix_other_endian; 32static smallint aix_other_endian; /* bool */
33static short aix_volumes = 1; 33static smallint aix_volumes = 1; /* max 15 */
34 34
35/* 35/*
36 * only dealing with free blocks here 36 * only dealing with free blocks here
diff --git a/util-linux/fdisk_sgi.c b/util-linux/fdisk_sgi.c
index f0bd195a1..7826bb7cc 100644
--- a/util-linux/fdisk_sgi.c
+++ b/util-linux/fdisk_sgi.c
@@ -1,5 +1,7 @@
1#if ENABLE_FEATURE_SGI_LABEL 1#if ENABLE_FEATURE_SGI_LABEL
2 2
3#define SGI_DEBUG 0
4
3/* 5/*
4 * Copyright (C) Andreas Neuper, Sep 1998. 6 * Copyright (C) Andreas Neuper, Sep 1998.
5 * This file may be modified and redistributed under 7 * This file may be modified and redistributed under
@@ -117,9 +119,8 @@ typedef struct {
117 */ 119 */
118 120
119 121
120static int sgi_other_endian; 122static smallint sgi_other_endian; /* bool */
121static int debug; 123static smallint sgi_volumes = 1; /* max 15 */
122static short sgi_volumes = 1;
123 124
124/* 125/*
125 * only dealing with free blocks here 126 * only dealing with free blocks here
@@ -318,7 +319,7 @@ sgi_list_table(int xtra)
318 "Pt# %*s Info Start End Sectors Id System\n", 319 "Pt# %*s Info Start End Sectors Id System\n",
319 w + 2, "Device"); 320 w + 2, "Device");
320 for (i = 0; i < g_partitions; i++) { 321 for (i = 0; i < g_partitions; i++) {
321 if (sgi_get_num_sectors(i) || debug ) { 322 if (sgi_get_num_sectors(i) || SGI_DEBUG) {
322 uint32_t start = sgi_get_start_sector(i); 323 uint32_t start = sgi_get_start_sector(i);
323 uint32_t len = sgi_get_num_sectors(i); 324 uint32_t len = sgi_get_num_sectors(i);
324 kpi++; /* only count nonempty partitions */ 325 kpi++; /* only count nonempty partitions */
@@ -514,7 +515,7 @@ verify_sgi(int verbose)
514 "at block 0,\n" 515 "at block 0,\n"
515 "not at diskblock %d\n", 516 "not at diskblock %d\n",
516 sgi_get_start_sector(Index[0])); 517 sgi_get_start_sector(Index[0]));
517 if (debug) /* I do not understand how some disks fulfil it */ 518 if (SGI_DEBUG) /* I do not understand how some disks fulfil it */
518 if ((sgi_get_num_sectors(Index[0]) != lastblock) && verbose) 519 if ((sgi_get_num_sectors(Index[0]) != lastblock) && verbose)
519 printf("The entire disk partition is only %d diskblock large,\n" 520 printf("The entire disk partition is only %d diskblock large,\n"
520 "but the disk is %d diskblocks long\n", 521 "but the disk is %d diskblocks long\n",
@@ -523,7 +524,7 @@ verify_sgi(int verbose)
523 } else { 524 } else {
524 if (verbose) 525 if (verbose)
525 printf("One Partition (#11) should cover the entire disk\n"); 526 printf("One Partition (#11) should cover the entire disk\n");
526 if (debug > 2) 527 if (SGI_DEBUG > 2)
527 printf("sysid=%d\tpartition=%d\n", 528 printf("sysid=%d\tpartition=%d\n",
528 sgi_get_sysid(Index[0]), Index[0]+1); 529 sgi_get_sysid(Index[0]), Index[0]+1);
529 } 530 }
@@ -531,13 +532,13 @@ verify_sgi(int verbose)
531 int cylsize = sgi_get_nsect() * sgi_get_ntrks(); 532 int cylsize = sgi_get_nsect() * sgi_get_ntrks();
532 533
533 if ((sgi_get_start_sector(Index[i]) % cylsize) != 0) { 534 if ((sgi_get_start_sector(Index[i]) % cylsize) != 0) {
534 if (debug) /* I do not understand how some disks fulfil it */ 535 if (SGI_DEBUG) /* I do not understand how some disks fulfil it */
535 if (verbose) 536 if (verbose)
536 printf("Partition %d does not start on cylinder boundary\n", 537 printf("Partition %d does not start on cylinder boundary\n",
537 Index[i]+1); 538 Index[i]+1);
538 } 539 }
539 if (sgi_get_num_sectors(Index[i]) % cylsize != 0) { 540 if (sgi_get_num_sectors(Index[i]) % cylsize != 0) {
540 if (debug) /* I do not understand how some disks fulfil it */ 541 if (SGI_DEBUG) /* I do not understand how some disks fulfil it */
541 if (verbose) 542 if (verbose)
542 printf("Partition %d does not end on cylinder boundary\n", 543 printf("Partition %d does not end on cylinder boundary\n",
543 Index[i]+1); 544 Index[i]+1);
@@ -562,7 +563,7 @@ verify_sgi(int verbose)
562 } 563 }
563 start = sgi_get_start_sector(Index[i]) 564 start = sgi_get_start_sector(Index[i])
564 + sgi_get_num_sectors(Index[i]); 565 + sgi_get_num_sectors(Index[i]);
565 if (debug > 1) { 566 if (SGI_DEBUG > 1) {
566 if (verbose) 567 if (verbose)
567 printf("%2d:%12d\t%12d\t%12d\n", Index[i], 568 printf("%2d:%12d\t%12d\t%12d\n", Index[i],
568 sgi_get_start_sector(Index[i]), 569 sgi_get_start_sector(Index[i]),
@@ -805,7 +806,7 @@ create_sgilabel(void)
805 old[i].start = get_start_sect(get_part_table(i)); 806 old[i].start = get_start_sect(get_part_table(i));
806 old[i].nsect = get_nr_sects(get_part_table(i)); 807 old[i].nsect = get_nr_sects(get_part_table(i));
807 printf("Trying to keep parameters of partition %d\n", i); 808 printf("Trying to keep parameters of partition %d\n", i);
808 if (debug) 809 if (SGI_DEBUG)
809 printf("ID=%02x\tSTART=%d\tLENGTH=%d\n", 810 printf("ID=%02x\tSTART=%d\tLENGTH=%d\n",
810 old[i].sysid, old[i].start, old[i].nsect); 811 old[i].sysid, old[i].start, old[i].nsect);
811 } 812 }
diff --git a/util-linux/ipcrm.c b/util-linux/ipcrm.c
index a9400d174..8d5f63c0f 100644
--- a/util-linux/ipcrm.c
+++ b/util-linux/ipcrm.c
@@ -24,7 +24,7 @@
24union semun { 24union semun {
25 int val; 25 int val;
26 struct semid_ds *buf; 26 struct semid_ds *buf;
27 unsigned short int *array; 27 unsigned short *array;
28 struct seminfo *__buf; 28 struct seminfo *__buf;
29}; 29};
30#endif 30#endif
diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c
index c7b46f589..97b98f300 100644
--- a/util-linux/ipcs.c
+++ b/util-linux/ipcs.c
@@ -68,7 +68,7 @@ struct shm_info {
68union semun { 68union semun {
69 int val; 69 int val;
70 struct semid_ds *buf; 70 struct semid_ds *buf;
71 unsigned short int *array; 71 unsigned short *array;
72 struct seminfo *__buf; 72 struct seminfo *__buf;
73}; 73};
74#endif 74#endif