aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-08-12 20:58:27 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-08-12 20:58:27 +0000
commit6ca409e0e4c198fe3081346eebbae3f068fe605a (patch)
tree060cb05d99220a1eda399194d1209c269f0e8cd8 /util-linux
parent4185548984357df91311f30c8e43d95f33922576 (diff)
downloadbusybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.tar.gz
busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.tar.bz2
busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.zip
trylink: produce even more info about final link stage
trylink: explain how to modify link and drastically decrease amount of padding (unfortunately, needs hand editing ATM). *: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts size saving: 0.5k
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/fdisk.c14
-rw-r--r--util-linux/fdisk_osf.c2
-rw-r--r--util-linux/getopt.c2
-rw-r--r--util-linux/hexdump.c6
-rw-r--r--util-linux/hwclock.c2
-rw-r--r--util-linux/mdev.c2
-rw-r--r--util-linux/mount.c6
-rw-r--r--util-linux/readprofile.c4
8 files changed, 19 insertions, 19 deletions
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index 0a8dbe94c..2933db472 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -48,12 +48,12 @@ struct hd_geometry {
48 48
49#define HDIO_GETGEO 0x0301 /* get device geometry */ 49#define HDIO_GETGEO 0x0301 /* get device geometry */
50 50
51static const char msg_building_new_label[] = 51static const char msg_building_new_label[] ALIGN1 =
52"Building a new %s. Changes will remain in memory only,\n" 52"Building a new %s. Changes will remain in memory only,\n"
53"until you decide to write them. After that the previous content\n" 53"until you decide to write them. After that the previous content\n"
54"won't be recoverable.\n\n"; 54"won't be recoverable.\n\n";
55 55
56static const char msg_part_already_defined[] = 56static const char msg_part_already_defined[] ALIGN1 =
57"Partition %d is already defined, delete it before re-adding\n"; 57"Partition %d is already defined, delete it before re-adding\n";
58 58
59 59
@@ -82,11 +82,11 @@ struct partition {
82 unsigned char size4[4]; /* nr of sectors in partition */ 82 unsigned char size4[4]; /* nr of sectors in partition */
83} ATTRIBUTE_PACKED; 83} ATTRIBUTE_PACKED;
84 84
85static const char unable_to_open[] = "cannot open %s"; 85static const char unable_to_open[] ALIGN1 = "cannot open %s";
86static const char unable_to_read[] = "cannot read from %s"; 86static const char unable_to_read[] ALIGN1 = "cannot read from %s";
87static const char unable_to_seek[] = "cannot seek on %s"; 87static const char unable_to_seek[] ALIGN1 = "cannot seek on %s";
88static const char unable_to_write[] = "cannot write to %s"; 88static const char unable_to_write[] ALIGN1 = "cannot write to %s";
89static const char ioctl_error[] = "BLKGETSIZE ioctl failed on %s"; 89static const char ioctl_error[] ALIGN1 = "BLKGETSIZE ioctl failed on %s";
90static void fdisk_fatal(const char *why) ATTRIBUTE_NORETURN; 90static void fdisk_fatal(const char *why) ATTRIBUTE_NORETURN;
91 91
92enum label_type { 92enum label_type {
diff --git a/util-linux/fdisk_osf.c b/util-linux/fdisk_osf.c
index 9f0dc7fd3..f6486d5f9 100644
--- a/util-linux/fdisk_osf.c
+++ b/util-linux/fdisk_osf.c
@@ -149,7 +149,7 @@ struct xbsd_disklabel {
149#define BSD_DSTYPE_DOSPART(s) ((s) & 3) /* dos partition number */ 149#define BSD_DSTYPE_DOSPART(s) ((s) & 3) /* dos partition number */
150#define BSD_DSTYPE_GEOMETRY 0x10 /* drive params in label */ 150#define BSD_DSTYPE_GEOMETRY 0x10 /* drive params in label */
151 151
152static const char * const xbsd_dktypenames[] = { 152static const char *const xbsd_dktypenames[] = {
153 "unknown", 153 "unknown",
154 "SMD", 154 "SMD",
155 "MSCP", 155 "MSCP",
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index 41299d2c3..246017036 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -266,7 +266,7 @@ static void set_shell(const char *new_shell)
266 */ 266 */
267 267
268#if ENABLE_GETOPT_LONG 268#if ENABLE_GETOPT_LONG
269static const char getopt_longopts[] = 269static const char getopt_longopts[] ALIGN1 =
270 "options\0" Required_argument "o" 270 "options\0" Required_argument "o"
271 "longoptions\0" Required_argument "l" 271 "longoptions\0" Required_argument "l"
272 "quiet\0" No_argument "q" 272 "quiet\0" No_argument "q"
diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c
index 213f6071b..e294f19da 100644
--- a/util-linux/hexdump.c
+++ b/util-linux/hexdump.c
@@ -35,7 +35,7 @@ static void bb_dump_addfile(char *name)
35 fclose(fp); 35 fclose(fp);
36} 36}
37 37
38static const char * const add_strings[] = { 38static const char *const add_strings[] = {
39 "\"%07.7_ax \" 16/1 \"%03o \" \"\\n\"", /* b */ 39 "\"%07.7_ax \" 16/1 \"%03o \" \"\\n\"", /* b */
40 "\"%07.7_ax \" 16/1 \"%3_c \" \"\\n\"", /* c */ 40 "\"%07.7_ax \" 16/1 \"%3_c \" \"\\n\"", /* c */
41 "\"%07.7_ax \" 8/2 \" %05u \" \"\\n\"", /* d */ 41 "\"%07.7_ax \" 8/2 \" %05u \" \"\\n\"", /* d */
@@ -43,9 +43,9 @@ static const char * const add_strings[] = {
43 "\"%07.7_ax \" 8/2 \" %04x \" \"\\n\"", /* x */ 43 "\"%07.7_ax \" 8/2 \" %04x \" \"\\n\"", /* x */
44}; 44};
45 45
46static const char add_first[] = "\"%07.7_Ax\n\""; 46static const char add_first[] ALIGN1 = "\"%07.7_Ax\n\"";
47 47
48static const char hexdump_opts[] = "bcdoxCe:f:n:s:v"; 48static const char hexdump_opts[] ALIGN1 = "bcdoxCe:f:n:s:v";
49 49
50static const struct suffix_mult suffixes[] = { 50static const struct suffix_mult suffixes[] = {
51 { "b", 512 }, 51 { "b", 512 },
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c
index ede95ecaa..867721482 100644
--- a/util-linux/hwclock.c
+++ b/util-linux/hwclock.c
@@ -178,7 +178,7 @@ int hwclock_main(int argc, char **argv)
178 int utc; 178 int utc;
179 179
180#if ENABLE_FEATURE_HWCLOCK_LONG_OPTIONS 180#if ENABLE_FEATURE_HWCLOCK_LONG_OPTIONS
181 static const char hwclock_longopts[] = 181 static const char hwclock_longopts[] ALIGN1 =
182 "localtime\0" No_argument "l" 182 "localtime\0" No_argument "l"
183 "utc\0" No_argument "u" 183 "utc\0" No_argument "u"
184 "show\0" No_argument "r" 184 "show\0" No_argument "r"
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index 17e5e88c6..33dc5d38f 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -233,7 +233,7 @@ static int dirAction(const char *fileName, struct stat *statbuf,
233 * - userspace writes "0" (worked) or "-1" (failed) to /sys/$DEVPATH/loading 233 * - userspace writes "0" (worked) or "-1" (failed) to /sys/$DEVPATH/loading
234 * - kernel loads firmware into device 234 * - kernel loads firmware into device
235 */ 235 */
236static inline void load_firmware(const char * const firmware, const char * const sysfs_path) 236static void load_firmware(const char *const firmware, const char *const sysfs_path)
237{ 237{
238 int cnt; 238 int cnt;
239 int firmware_fd, loading_fd, data_fd; 239 int firmware_fd, loading_fd, data_fd;
diff --git a/util-linux/mount.c b/util-linux/mount.c
index a7b0a98f0..c159f41e1 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -888,7 +888,7 @@ static int nfsmount(struct mntent *mp, int vfsflags, char *filteropts)
888 if (filteropts) for (opt = strtok(filteropts, ","); opt; opt = strtok(NULL, ",")) { 888 if (filteropts) for (opt = strtok(filteropts, ","); opt; opt = strtok(NULL, ",")) {
889 char *opteq = strchr(opt, '='); 889 char *opteq = strchr(opt, '=');
890 if (opteq) { 890 if (opteq) {
891 static const char options[] = 891 static const char options[] ALIGN1 =
892 /* 0 */ "rsize\0" 892 /* 0 */ "rsize\0"
893 /* 1 */ "wsize\0" 893 /* 1 */ "wsize\0"
894 /* 2 */ "timeo\0" 894 /* 2 */ "timeo\0"
@@ -991,7 +991,7 @@ static int nfsmount(struct mntent *mp, int vfsflags, char *filteropts)
991 } 991 }
992 } 992 }
993 else { 993 else {
994 static const char options[] = 994 static const char options[] ALIGN1 =
995 "bg\0" 995 "bg\0"
996 "fg\0" 996 "fg\0"
997 "soft\0" 997 "soft\0"
@@ -1524,7 +1524,7 @@ static int singlemount(struct mntent *mp, int ignore_busy)
1524// Parse options, if necessary parse fstab/mtab, and call singlemount for 1524// Parse options, if necessary parse fstab/mtab, and call singlemount for
1525// each directory to be mounted. 1525// each directory to be mounted.
1526 1526
1527static const char must_be_root[] = "you must be root"; 1527static const char must_be_root[] ALIGN1 = "you must be root";
1528 1528
1529int mount_main(int argc, char **argv); 1529int mount_main(int argc, char **argv);
1530int mount_main(int argc, char **argv) 1530int mount_main(int argc, char **argv)
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c
index 02afedcf0..347621c19 100644
--- a/util-linux/readprofile.c
+++ b/util-linux/readprofile.c
@@ -38,8 +38,8 @@
38#define S_LEN 128 38#define S_LEN 128
39 39
40/* These are the defaults */ 40/* These are the defaults */
41static const char defaultmap[] = "/boot/System.map"; 41static const char defaultmap[] ALIGN1 = "/boot/System.map";
42static const char defaultpro[] = "/proc/profile"; 42static const char defaultpro[] ALIGN1 = "/proc/profile";
43 43
44int readprofile_main(int argc, char **argv); 44int readprofile_main(int argc, char **argv);
45int readprofile_main(int argc, char **argv) 45int readprofile_main(int argc, char **argv)