diff options
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/acpid.c | 2 | ||||
-rw-r--r-- | util-linux/fdformat.c | 2 | ||||
-rw-r--r-- | util-linux/fdisk_gpt.c | 2 | ||||
-rw-r--r-- | util-linux/fdisk_sun.c | 2 | ||||
-rw-r--r-- | util-linux/ipcrm.c | 7 | ||||
-rw-r--r-- | util-linux/mkfs_ext2.c | 4 | ||||
-rw-r--r-- | util-linux/mkfs_vfat.c | 2 | ||||
-rw-r--r-- | util-linux/readprofile.c | 4 | ||||
-rw-r--r-- | util-linux/rtcwake.c | 2 | ||||
-rw-r--r-- | util-linux/script.c | 2 |
10 files changed, 14 insertions, 15 deletions
diff --git a/util-linux/acpid.c b/util-linux/acpid.c index 5a3bd5a6a..0b227a8ae 100644 --- a/util-linux/acpid.c +++ b/util-linux/acpid.c | |||
@@ -52,7 +52,7 @@ struct globals { | |||
52 | int n_evt; | 52 | int n_evt; |
53 | } FIX_ALIASING; | 53 | } FIX_ALIASING; |
54 | #define G (*ptr_to_globals) | 54 | #define G (*ptr_to_globals) |
55 | #define act_tab (G.act_tab) | 55 | #define act_tab (G.act_tab) |
56 | #define n_act (G.n_act ) | 56 | #define n_act (G.n_act ) |
57 | #define evt_tab (G.evt_tab) | 57 | #define evt_tab (G.evt_tab) |
58 | #define n_evt (G.n_evt ) | 58 | #define n_evt (G.n_evt ) |
diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c index f5c386c46..57e9c26f8 100644 --- a/util-linux/fdformat.c +++ b/util-linux/fdformat.c | |||
@@ -36,7 +36,7 @@ struct format_descr { | |||
36 | unsigned int device,head,track; | 36 | unsigned int device,head,track; |
37 | }; | 37 | }; |
38 | #define FDFMTBEG _IO(2,0x47) | 38 | #define FDFMTBEG _IO(2,0x47) |
39 | #define FDFMTTRK _IOW(2,0x48, struct format_descr) | 39 | #define FDFMTTRK _IOW(2,0x48, struct format_descr) |
40 | #define FDFMTEND _IO(2,0x49) | 40 | #define FDFMTEND _IO(2,0x49) |
41 | #define FDGETPRM _IOR(2, 0x04, struct floppy_struct) | 41 | #define FDGETPRM _IOR(2, 0x04, struct floppy_struct) |
42 | #define FD_FILL_BYTE 0xF6 /* format fill byte. */ | 42 | #define FD_FILL_BYTE 0xF6 /* format fill byte. */ |
diff --git a/util-linux/fdisk_gpt.c b/util-linux/fdisk_gpt.c index 1ab1293de..d43d9c709 100644 --- a/util-linux/fdisk_gpt.c +++ b/util-linux/fdisk_gpt.c | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | #define GPT_MAGIC 0x5452415020494645ULL | 8 | #define GPT_MAGIC 0x5452415020494645ULL |
9 | enum { | 9 | enum { |
10 | LEGACY_GPT_TYPE = 0xee, | 10 | LEGACY_GPT_TYPE = 0xee, |
11 | GPT_MAX_PARTS = 256, | 11 | GPT_MAX_PARTS = 256, |
12 | GPT_MAX_PART_ENTRY_LEN = 4096, | 12 | GPT_MAX_PART_ENTRY_LEN = 4096, |
13 | GUID_LEN = 16, | 13 | GUID_LEN = 16, |
diff --git a/util-linux/fdisk_sun.c b/util-linux/fdisk_sun.c index 6b7940c54..e7fcc067c 100644 --- a/util-linux/fdisk_sun.c +++ b/util-linux/fdisk_sun.c | |||
@@ -654,7 +654,7 @@ sun_list_table(int xtra) | |||
654 | uint32_t start = SUN_SSWAP32(sunlabel->partitions[i].start_cylinder) * g_heads * g_sectors; | 654 | uint32_t start = SUN_SSWAP32(sunlabel->partitions[i].start_cylinder) * g_heads * g_sectors; |
655 | uint32_t len = SUN_SSWAP32(sunlabel->partitions[i].num_sectors); | 655 | uint32_t len = SUN_SSWAP32(sunlabel->partitions[i].num_sectors); |
656 | printf("%s %c%c %9lu %9lu %9lu%c %2x %s\n", | 656 | printf("%s %c%c %9lu %9lu %9lu%c %2x %s\n", |
657 | partname(disk_device, i+1, w), /* device */ | 657 | partname(disk_device, i+1, w), /* device */ |
658 | (sunlabel->infos[i].flags & 0x01) ? 'u' : ' ', /* flags */ | 658 | (sunlabel->infos[i].flags & 0x01) ? 'u' : ' ', /* flags */ |
659 | (sunlabel->infos[i].flags & 0x10) ? 'r' : ' ', | 659 | (sunlabel->infos[i].flags & 0x10) ? 'r' : ' ', |
660 | (long) scround(start), /* start */ | 660 | (long) scround(start), /* start */ |
diff --git a/util-linux/ipcrm.c b/util-linux/ipcrm.c index 6360c706f..731216c06 100644 --- a/util-linux/ipcrm.c +++ b/util-linux/ipcrm.c | |||
@@ -43,7 +43,6 @@ typedef enum type_id { | |||
43 | static int remove_ids(type_id type, int argc, char **argv) | 43 | static int remove_ids(type_id type, int argc, char **argv) |
44 | { | 44 | { |
45 | unsigned long id; | 45 | unsigned long id; |
46 | int ret = 0; /* silence gcc */ | ||
47 | int nb_errors = 0; | 46 | int nb_errors = 0; |
48 | union semun arg; | 47 | union semun arg; |
49 | 48 | ||
@@ -55,6 +54,7 @@ static int remove_ids(type_id type, int argc, char **argv) | |||
55 | bb_error_msg("invalid id: %s", argv[0]); | 54 | bb_error_msg("invalid id: %s", argv[0]); |
56 | nb_errors++; | 55 | nb_errors++; |
57 | } else { | 56 | } else { |
57 | int ret = 0; | ||
58 | if (type == SEM) | 58 | if (type == SEM) |
59 | ret = semctl(id, 0, IPC_RMID, arg); | 59 | ret = semctl(id, 0, IPC_RMID, arg); |
60 | else if (type == MSG) | 60 | else if (type == MSG) |
@@ -92,14 +92,13 @@ int ipcrm_main(int argc, char **argv) | |||
92 | type_id what = 0; /* silence gcc */ | 92 | type_id what = 0; /* silence gcc */ |
93 | char w; | 93 | char w; |
94 | 94 | ||
95 | w=argv[1][0]; | 95 | w = argv[1][0]; |
96 | if ( ((w == 'm' && argv[1][1] == 's' && argv[1][2] == 'g') | 96 | if ( ((w == 'm' && argv[1][1] == 's' && argv[1][2] == 'g') |
97 | || (argv[1][0] == 's' | 97 | || (argv[1][0] == 's' |
98 | && ((w=argv[1][1]) == 'h' || w == 'e') | 98 | && ((w = argv[1][1]) == 'h' || w == 'e') |
99 | && argv[1][2] == 'm') | 99 | && argv[1][2] == 'm') |
100 | ) && argv[1][3] == '\0' | 100 | ) && argv[1][3] == '\0' |
101 | ) { | 101 | ) { |
102 | |||
103 | if (argc < 3) | 102 | if (argc < 3) |
104 | bb_show_usage(); | 103 | bb_show_usage(); |
105 | 104 | ||
diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c index 6dccd3a5d..871ec835e 100644 --- a/util-linux/mkfs_ext2.c +++ b/util-linux/mkfs_ext2.c | |||
@@ -11,8 +11,8 @@ | |||
11 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
12 | #include <linux/ext2_fs.h> | 12 | #include <linux/ext2_fs.h> |
13 | 13 | ||
14 | #define ENABLE_FEATURE_MKFS_EXT2_RESERVED_GDT 0 | 14 | #define ENABLE_FEATURE_MKFS_EXT2_RESERVED_GDT 0 |
15 | #define ENABLE_FEATURE_MKFS_EXT2_DIR_INDEX 1 | 15 | #define ENABLE_FEATURE_MKFS_EXT2_DIR_INDEX 1 |
16 | 16 | ||
17 | // from e2fsprogs | 17 | // from e2fsprogs |
18 | #define s_reserved_gdt_blocks s_padding1 | 18 | #define s_reserved_gdt_blocks s_padding1 |
diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c index 45760f7c5..bb5b59c66 100644 --- a/util-linux/mkfs_vfat.c +++ b/util-linux/mkfs_vfat.c | |||
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | #define ATTR_VOLUME 8 | 29 | #define ATTR_VOLUME 8 |
30 | 30 | ||
31 | #define NUM_FATS 2 | 31 | #define NUM_FATS 2 |
32 | 32 | ||
33 | /* FAT32 filesystem looks like this: | 33 | /* FAT32 filesystem looks like this: |
34 | * sector -nn...-1: "hidden" sectors, all sectors before this partition | 34 | * sector -nn...-1: "hidden" sectors, all sectors before this partition |
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c index 00b3382d8..f8a6e0cd0 100644 --- a/util-linux/readprofile.c +++ b/util-linux/readprofile.c | |||
@@ -97,7 +97,7 @@ int readprofile_main(int argc UNUSED_PARAM, char **argv) | |||
97 | */ | 97 | */ |
98 | to_write = sizeof(int); | 98 | to_write = sizeof(int); |
99 | if (!optMult) | 99 | if (!optMult) |
100 | to_write = 1; /* sth different from sizeof(int) */ | 100 | to_write = 1; /* sth different from sizeof(int) */ |
101 | 101 | ||
102 | fd = xopen(defaultpro, O_WRONLY); | 102 | fd = xopen(defaultpro, O_WRONLY); |
103 | xwrite(fd, &multiplier, to_write); | 103 | xwrite(fd, &multiplier, to_write); |
@@ -179,7 +179,7 @@ int readprofile_main(int argc UNUSED_PARAM, char **argv) | |||
179 | if (*mode != 'T' && *mode != 't' | 179 | if (*mode != 'T' && *mode != 't' |
180 | && *mode != 'W' && *mode != 'w' | 180 | && *mode != 'W' && *mode != 'w' |
181 | ) { | 181 | ) { |
182 | break; /* only text is profiled */ | 182 | break; /* only text is profiled */ |
183 | } | 183 | } |
184 | 184 | ||
185 | if (indx >= len / sizeof(*buf)) | 185 | if (indx >= len / sizeof(*buf)) |
diff --git a/util-linux/rtcwake.c b/util-linux/rtcwake.c index 26e5b4724..06ed7eafc 100644 --- a/util-linux/rtcwake.c +++ b/util-linux/rtcwake.c | |||
@@ -50,7 +50,7 @@ static NOINLINE bool may_wakeup(const char *rtcname) | |||
50 | static NOINLINE void setup_alarm(int fd, time_t *wakeup, time_t rtc_time) | 50 | static NOINLINE void setup_alarm(int fd, time_t *wakeup, time_t rtc_time) |
51 | { | 51 | { |
52 | struct tm *ptm; | 52 | struct tm *ptm; |
53 | struct linux_rtc_wkalrm wake; | 53 | struct linux_rtc_wkalrm wake; |
54 | 54 | ||
55 | /* The wakeup time is in POSIX time (more or less UTC). | 55 | /* The wakeup time is in POSIX time (more or less UTC). |
56 | * Ideally RTCs use that same time; but PCs can't do that | 56 | * Ideally RTCs use that same time; but PCs can't do that |
diff --git a/util-linux/script.c b/util-linux/script.c index 0860bb083..b9317fc7c 100644 --- a/util-linux/script.c +++ b/util-linux/script.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * | 6 | * |
7 | * Based on code from util-linux v 2.12r | 7 | * Based on code from util-linux v 2.12r |
8 | * Copyright (c) 1980 | 8 | * Copyright (c) 1980 |
9 | * The Regents of the University of California. All rights reserved. | 9 | * The Regents of the University of California. All rights reserved. |
10 | * | 10 | * |
11 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 11 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
12 | */ | 12 | */ |