aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2001-01-31 19:00:21 +0000
committerMatt Kraai <kraai@debian.org>2001-01-31 19:00:21 +0000
commitdd19c6990496023fe23fefef8f1798740f7d39c6 (patch)
tree3933adefa4171173db78fa2389146ac89f4edb86 /util-linux
parent63ec2732454a0c973305794e185e488106f6b282 (diff)
downloadbusybox-w32-dd19c6990496023fe23fefef8f1798740f7d39c6.tar.gz
busybox-w32-dd19c6990496023fe23fefef8f1798740f7d39c6.tar.bz2
busybox-w32-dd19c6990496023fe23fefef8f1798740f7d39c6.zip
Removed trailing \n from error_msg{,_and_die} messages.
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/fbset.c4
-rw-r--r--util-linux/fsck_minix.c2
-rw-r--r--util-linux/getopt.c8
-rw-r--r--util-linux/mkfs_minix.c50
-rw-r--r--util-linux/mkswap.c32
-rw-r--r--util-linux/mount.c10
-rw-r--r--util-linux/nfsmount.c24
-rw-r--r--util-linux/rdate.c2
-rw-r--r--util-linux/swaponoff.c2
-rw-r--r--util-linux/umount.c8
10 files changed, 71 insertions, 71 deletions
diff --git a/util-linux/fbset.c b/util-linux/fbset.c
index 637896bed..f20c284aa 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
@@ -284,7 +284,7 @@ static int readmode(struct fb_var_screeninfo *base, const char *fn,
284 } 284 }
285 } 285 }
286#else 286#else
287 error_msg( "mode reading not compiled in\n"); 287 error_msg( "mode reading not compiled in");
288#endif 288#endif
289 return 0; 289 return 0;
290} 290}
@@ -434,7 +434,7 @@ extern int fbset_main(int argc, char **argv)
434 perror_msg_and_die("fbset(ioctl)"); 434 perror_msg_and_die("fbset(ioctl)");
435 if (g_options & OPT_READMODE) { 435 if (g_options & OPT_READMODE) {
436 if (!readmode(&var, modefile, mode)) { 436 if (!readmode(&var, modefile, mode)) {
437 error_msg("Unknown video mode `%s'\n", mode); 437 error_msg("Unknown video mode `%s'", mode);
438 return EXIT_FAILURE; 438 return EXIT_FAILURE;
439 } 439 }
440 } 440 }
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index 18841ec56..9d7622006 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -290,7 +290,7 @@ static void show_usage(void)
290 290
291static void die(const char *str) 291static void die(const char *str)
292{ 292{
293 error_msg("%s\n", str); 293 error_msg("%s", str);
294 leave(8); 294 leave(8);
295} 295}
296 296
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index ff55a3e3c..625263184 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -258,7 +258,7 @@ void add_long_options(char *options)
258 arg_opt=required_argument; 258 arg_opt=required_argument;
259 } 259 }
260 if (strlen(tokptr) == 0) 260 if (strlen(tokptr) == 0)
261 error_msg("empty long option after -l or --long argument\n"); 261 error_msg("empty long option after -l or --long argument");
262 } 262 }
263 add_longopt(tokptr,arg_opt); 263 add_longopt(tokptr,arg_opt);
264 } 264 }
@@ -277,7 +277,7 @@ void set_shell(const char *new_shell)
277 else if (!strcmp(new_shell,"csh")) 277 else if (!strcmp(new_shell,"csh"))
278 shell=TCSH; 278 shell=TCSH;
279 else 279 else
280 error_msg("unknown shell after -s or --shell argument\n"); 280 error_msg("unknown shell after -s or --shell argument");
281} 281}
282 282
283 283
@@ -326,7 +326,7 @@ int getopt_main(int argc, char *argv[])
326 printf(" --\n"); 326 printf(" --\n");
327 exit(0); 327 exit(0);
328 } else 328 } else
329 error_msg_and_die("missing optstring argument\n"); 329 error_msg_and_die("missing optstring argument");
330 } 330 }
331 331
332 if (argv[1][0] != '-' || compatible) { 332 if (argv[1][0] != '-' || compatible) {
@@ -377,7 +377,7 @@ int getopt_main(int argc, char *argv[])
377 377
378 if (!optstr) { 378 if (!optstr) {
379 if (optind >= argc) 379 if (optind >= argc)
380 error_msg_and_die("missing optstring argument\n"); 380 error_msg_and_die("missing optstring argument");
381 else { 381 else {
382 optstr=xmalloc(strlen(argv[optind])+1); 382 optstr=xmalloc(strlen(argv[optind])+1);
383 strcpy(optstr,argv[optind]); 383 strcpy(optstr,argv[optind]);
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index 21965d3b1..a2b6d8a6e 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -279,7 +279,7 @@ static void check_mount(void)
279 if (!mnt) 279 if (!mnt)
280 return; 280 return;
281 281
282 error_msg_and_die("%s is mounted; will not make a filesystem here!\n", device_name); 282 error_msg_and_die("%s is mounted; will not make a filesystem here!", device_name);
283} 283}
284 284
285static long valid_offset(int fd, int offset) 285static long valid_offset(int fd, int offset)
@@ -336,28 +336,28 @@ static void write_tables(void)
336 Super.s_state &= ~MINIX_ERROR_FS; 336 Super.s_state &= ~MINIX_ERROR_FS;
337 337
338 if (lseek(DEV, 0, SEEK_SET)) 338 if (lseek(DEV, 0, SEEK_SET))
339 error_msg_and_die("seek to boot block failed in write_tables\n"); 339 error_msg_and_die("seek to boot block failed in write_tables");
340 if (512 != write(DEV, boot_block_buffer, 512)) 340 if (512 != write(DEV, boot_block_buffer, 512))
341 error_msg_and_die("unable to clear boot sector\n"); 341 error_msg_and_die("unable to clear boot sector");
342 if (BLOCK_SIZE != lseek(DEV, BLOCK_SIZE, SEEK_SET)) 342 if (BLOCK_SIZE != lseek(DEV, BLOCK_SIZE, SEEK_SET))
343 error_msg_and_die("seek failed in write_tables\n"); 343 error_msg_and_die("seek failed in write_tables");
344 if (BLOCK_SIZE != write(DEV, super_block_buffer, BLOCK_SIZE)) 344 if (BLOCK_SIZE != write(DEV, super_block_buffer, BLOCK_SIZE))
345 error_msg_and_die("unable to write super-block\n"); 345 error_msg_and_die("unable to write super-block");
346 if (IMAPS * BLOCK_SIZE != write(DEV, inode_map, IMAPS * BLOCK_SIZE)) 346 if (IMAPS * BLOCK_SIZE != write(DEV, inode_map, IMAPS * BLOCK_SIZE))
347 error_msg_and_die("unable to write inode map\n"); 347 error_msg_and_die("unable to write inode map");
348 if (ZMAPS * BLOCK_SIZE != write(DEV, zone_map, ZMAPS * BLOCK_SIZE)) 348 if (ZMAPS * BLOCK_SIZE != write(DEV, zone_map, ZMAPS * BLOCK_SIZE))
349 error_msg_and_die("unable to write zone map\n"); 349 error_msg_and_die("unable to write zone map");
350 if (INODE_BUFFER_SIZE != write(DEV, inode_buffer, INODE_BUFFER_SIZE)) 350 if (INODE_BUFFER_SIZE != write(DEV, inode_buffer, INODE_BUFFER_SIZE))
351 error_msg_and_die("unable to write inodes\n"); 351 error_msg_and_die("unable to write inodes");
352 352
353} 353}
354 354
355static void write_block(int blk, char *buffer) 355static void write_block(int blk, char *buffer)
356{ 356{
357 if (blk * BLOCK_SIZE != lseek(DEV, blk * BLOCK_SIZE, SEEK_SET)) 357 if (blk * BLOCK_SIZE != lseek(DEV, blk * BLOCK_SIZE, SEEK_SET))
358 error_msg_and_die("seek failed in write_block\n"); 358 error_msg_and_die("seek failed in write_block");
359 if (BLOCK_SIZE != write(DEV, buffer, BLOCK_SIZE)) 359 if (BLOCK_SIZE != write(DEV, buffer, BLOCK_SIZE))
360 error_msg_and_die("write failed in write_block\n"); 360 error_msg_and_die("write failed in write_block");
361} 361}
362 362
363static int get_free_block(void) 363static int get_free_block(void)
@@ -365,7 +365,7 @@ static int get_free_block(void)
365 int blk; 365 int blk;
366 366
367 if (used_good_blocks + 1 >= MAX_GOOD_BLOCKS) 367 if (used_good_blocks + 1 >= MAX_GOOD_BLOCKS)
368 error_msg_and_die("too many bad blocks\n"); 368 error_msg_and_die("too many bad blocks");
369 if (used_good_blocks) 369 if (used_good_blocks)
370 blk = good_blocks_table[used_good_blocks - 1] + 1; 370 blk = good_blocks_table[used_good_blocks - 1] + 1;
371 else 371 else
@@ -373,7 +373,7 @@ static int get_free_block(void)
373 while (blk < ZONES && zone_in_use(blk)) 373 while (blk < ZONES && zone_in_use(blk))
374 blk++; 374 blk++;
375 if (blk >= ZONES) 375 if (blk >= ZONES)
376 error_msg_and_die("not enough good blocks\n"); 376 error_msg_and_die("not enough good blocks");
377 good_blocks_table[used_good_blocks] = blk; 377 good_blocks_table[used_good_blocks] = blk;
378 used_good_blocks++; 378 used_good_blocks++;
379 return blk; 379 return blk;
@@ -439,7 +439,7 @@ static void make_bad_inode(void)
439 goto end_bad; 439 goto end_bad;
440 } 440 }
441 } 441 }
442 error_msg_and_die("too many bad blocks\n"); 442 error_msg_and_die("too many bad blocks");
443 end_bad: 443 end_bad:
444 if (ind) 444 if (ind)
445 write_block(ind, (char *) ind_block); 445 write_block(ind, (char *) ind_block);
@@ -489,7 +489,7 @@ static void make_bad_inode2(void)
489 } 489 }
490 } 490 }
491 /* Could make triple indirect block here */ 491 /* Could make triple indirect block here */
492 error_msg_and_die("too many bad blocks\n"); 492 error_msg_and_die("too many bad blocks");
493 end_bad: 493 end_bad:
494 if (ind) 494 if (ind)
495 write_block(ind, (char *) ind_block); 495 write_block(ind, (char *) ind_block);
@@ -590,7 +590,7 @@ static void setup_tables(void)
590 * /sbin/mkfs.minix -i 200 test.fs 590 * /sbin/mkfs.minix -i 200 test.fs
591 * */ 591 * */
592 if (i >= 999) { 592 if (i >= 999) {
593 error_msg_and_die("unable to allocate buffers for maps\n"); 593 error_msg_and_die("unable to allocate buffers for maps");
594 } 594 }
595 FIRSTZONE = NORM_FIRSTZONE; 595 FIRSTZONE = NORM_FIRSTZONE;
596 inode_map = xmalloc(IMAPS * BLOCK_SIZE); 596 inode_map = xmalloc(IMAPS * BLOCK_SIZE);
@@ -621,7 +621,7 @@ long do_check(char *buffer, int try, unsigned int current_block)
621 /* Seek to the correct loc. */ 621 /* Seek to the correct loc. */
622 if (lseek(DEV, current_block * BLOCK_SIZE, SEEK_SET) != 622 if (lseek(DEV, current_block * BLOCK_SIZE, SEEK_SET) !=
623 current_block * BLOCK_SIZE) { 623 current_block * BLOCK_SIZE) {
624 error_msg_and_die("seek failed during testing of blocks\n"); 624 error_msg_and_die("seek failed during testing of blocks");
625 } 625 }
626 626
627 627
@@ -661,7 +661,7 @@ static void check_blocks(void)
661 while (currently_testing < ZONES) { 661 while (currently_testing < ZONES) {
662 if (lseek(DEV, currently_testing * BLOCK_SIZE, SEEK_SET) != 662 if (lseek(DEV, currently_testing * BLOCK_SIZE, SEEK_SET) !=
663 currently_testing * BLOCK_SIZE) 663 currently_testing * BLOCK_SIZE)
664 error_msg_and_die("seek failed in check_blocks\n"); 664 error_msg_and_die("seek failed in check_blocks");
665 try = TEST_BUFFER_BLOCKS; 665 try = TEST_BUFFER_BLOCKS;
666 if (currently_testing + try > ZONES) 666 if (currently_testing + try > ZONES)
667 try = ZONES - currently_testing; 667 try = ZONES - currently_testing;
@@ -670,7 +670,7 @@ static void check_blocks(void)
670 if (got == try) 670 if (got == try)
671 continue; 671 continue;
672 if (currently_testing < FIRSTZONE) 672 if (currently_testing < FIRSTZONE)
673 error_msg_and_die("bad blocks before data-area: cannot make fs\n"); 673 error_msg_and_die("bad blocks before data-area: cannot make fs");
674 mark_zone(currently_testing); 674 mark_zone(currently_testing);
675 badblocks++; 675 badblocks++;
676 currently_testing++; 676 currently_testing++;
@@ -690,7 +690,7 @@ char *filename;
690 690
691 listfile = fopen(filename, "r"); 691 listfile = fopen(filename, "r");
692 if (listfile == (FILE *) NULL) { 692 if (listfile == (FILE *) NULL) {
693 error_msg_and_die("can't open file of bad blocks\n"); 693 error_msg_and_die("can't open file of bad blocks");
694 } 694 }
695 while (!feof(listfile)) { 695 while (!feof(listfile)) {
696 fscanf(listfile, "%ld\n", &blockno); 696 fscanf(listfile, "%ld\n", &blockno);
@@ -712,10 +712,10 @@ extern int mkfs_minix_main(int argc, char **argv)
712 int stopIt=FALSE; 712 int stopIt=FALSE;
713 713
714 if (INODE_SIZE * MINIX_INODES_PER_BLOCK != BLOCK_SIZE) 714 if (INODE_SIZE * MINIX_INODES_PER_BLOCK != BLOCK_SIZE)
715 error_msg_and_die("bad inode size\n"); 715 error_msg_and_die("bad inode size");
716#ifdef BB_FEATURE_MINIX2 716#ifdef BB_FEATURE_MINIX2
717 if (INODE_SIZE2 * MINIX2_INODES_PER_BLOCK != BLOCK_SIZE) 717 if (INODE_SIZE2 * MINIX2_INODES_PER_BLOCK != BLOCK_SIZE)
718 error_msg_and_die("bad inode size\n"); 718 error_msg_and_die("bad inode size");
719#endif 719#endif
720 720
721 /* Parse options */ 721 /* Parse options */
@@ -781,7 +781,7 @@ extern int mkfs_minix_main(int argc, char **argv)
781#ifdef BB_FEATURE_MINIX2 781#ifdef BB_FEATURE_MINIX2
782 version2 = 1; 782 version2 = 1;
783#else 783#else
784 error_msg("%s: not compiled with minix v2 support\n", 784 error_msg("%s: not compiled with minix v2 support",
785 device_name); 785 device_name);
786 exit(-1); 786 exit(-1);
787#endif 787#endif
@@ -832,13 +832,13 @@ goodbye:
832 strcpy(tmp + 2, ".badblocks"); 832 strcpy(tmp + 2, ".badblocks");
833 DEV = open(device_name, O_RDWR); 833 DEV = open(device_name, O_RDWR);
834 if (DEV < 0) 834 if (DEV < 0)
835 error_msg_and_die("unable to open %s\n", device_name); 835 error_msg_and_die("unable to open %s", device_name);
836 if (fstat(DEV, &statbuf) < 0) 836 if (fstat(DEV, &statbuf) < 0)
837 error_msg_and_die("unable to stat %s\n", device_name); 837 error_msg_and_die("unable to stat %s", device_name);
838 if (!S_ISBLK(statbuf.st_mode)) 838 if (!S_ISBLK(statbuf.st_mode))
839 check = 0; 839 check = 0;
840 else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) 840 else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340)
841 error_msg_and_die("will not try to make filesystem on '%s'\n", device_name); 841 error_msg_and_die("will not try to make filesystem on '%s'", device_name);
842 setup_tables(); 842 setup_tables();
843 if (check) 843 if (check)
844 check_blocks(); 844 check_blocks();
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index 8a3c900f3..7d690ad99 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -87,7 +87,7 @@ static void init_signature_page()
87 87
88#ifdef PAGE_SIZE 88#ifdef PAGE_SIZE
89 if (pagesize != PAGE_SIZE) 89 if (pagesize != PAGE_SIZE)
90 error_msg("Assuming pages of size %d\n", pagesize); 90 error_msg("Assuming pages of size %d", pagesize);
91#endif 91#endif
92 signature_page = (int *) xmalloc(pagesize); 92 signature_page = (int *) xmalloc(pagesize);
93 memset(signature_page, 0, pagesize); 93 memset(signature_page, 0, pagesize);
@@ -185,7 +185,7 @@ static void page_bad(int page)
185 bit_test_and_clear(signature_page, page); 185 bit_test_and_clear(signature_page, page);
186 else { 186 else {
187 if (badpages == MAX_BADPAGES) 187 if (badpages == MAX_BADPAGES)
188 error_msg_and_die("too many bad pages\n"); 188 error_msg_and_die("too many bad pages");
189 p->badpages[badpages] = page; 189 p->badpages[badpages] = page;
190 } 190 }
191 badpages++; 191 badpages++;
@@ -206,7 +206,7 @@ static void check_blocks(void)
206 } 206 }
207 if (do_seek && lseek(DEV, current_page * pagesize, SEEK_SET) != 207 if (do_seek && lseek(DEV, current_page * pagesize, SEEK_SET) !=
208 current_page * pagesize) 208 current_page * pagesize)
209 error_msg_and_die("seek failed in check_blocks\n"); 209 error_msg_and_die("seek failed in check_blocks");
210 if ((do_seek = (pagesize != read(DEV, buffer, pagesize)))) { 210 if ((do_seek = (pagesize != read(DEV, buffer, pagesize)))) {
211 page_bad(current_page++); 211 page_bad(current_page++);
212 continue; 212 continue;
@@ -307,14 +307,14 @@ int mkswap_main(int argc, char **argv)
307 } 307 }
308 } 308 }
309 if (!device_name) { 309 if (!device_name) {
310 error_msg("error: Nowhere to set up swap on?\n"); 310 error_msg("error: Nowhere to set up swap on?");
311 usage(mkswap_usage); 311 usage(mkswap_usage);
312 } 312 }
313 sz = get_size(device_name); 313 sz = get_size(device_name);
314 if (!PAGES) { 314 if (!PAGES) {
315 PAGES = sz; 315 PAGES = sz;
316 } else if (PAGES > sz && !force) { 316 } else if (PAGES > sz && !force) {
317 error_msg("error: size %ld is larger than device size %d\n", 317 error_msg("error: size %ld is larger than device size %d",
318 PAGES * (pagesize / 1024), sz * (pagesize / 1024)); 318 PAGES * (pagesize / 1024), sz * (pagesize / 1024));
319 return EXIT_FAILURE; 319 return EXIT_FAILURE;
320 } 320 }
@@ -330,11 +330,11 @@ int mkswap_main(int argc, char **argv)
330 version = 1; 330 version = 1;
331 } 331 }
332 if (version != 0 && version != 1) { 332 if (version != 0 && version != 1) {
333 error_msg("error: unknown version %d\n", version); 333 error_msg("error: unknown version %d", version);
334 usage(mkswap_usage); 334 usage(mkswap_usage);
335 } 335 }
336 if (PAGES < 10) { 336 if (PAGES < 10) {
337 error_msg("error: swap area needs to be at least %ldkB\n", 337 error_msg("error: swap area needs to be at least %ldkB",
338 (long) (10 * pagesize / 1024)); 338 (long) (10 * pagesize / 1024));
339 usage(mkswap_usage); 339 usage(mkswap_usage);
340 } 340 }
@@ -353,7 +353,7 @@ int mkswap_main(int argc, char **argv)
353#endif 353#endif
354 if (PAGES > maxpages) { 354 if (PAGES > maxpages) {
355 PAGES = maxpages; 355 PAGES = maxpages;
356 error_msg("warning: truncating swap area to %ldkB\n", 356 error_msg("warning: truncating swap area to %ldkB",
357 PAGES * pagesize / 1024); 357 PAGES * pagesize / 1024);
358 } 358 }
359 359
@@ -363,7 +363,7 @@ int mkswap_main(int argc, char **argv)
363 if (!S_ISBLK(statbuf.st_mode)) 363 if (!S_ISBLK(statbuf.st_mode))
364 check = 0; 364 check = 0;
365 else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) 365 else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340)
366 error_msg_and_die("Will not try to make swapdevice on '%s'\n", device_name); 366 error_msg_and_die("Will not try to make swapdevice on '%s'", device_name);
367 367
368#ifdef __sparc__ 368#ifdef __sparc__
369 if (!force && version == 0) { 369 if (!force && version == 0) {
@@ -372,7 +372,7 @@ int mkswap_main(int argc, char **argv)
372 unsigned short *q, sum; 372 unsigned short *q, sum;
373 373
374 if (read(DEV, buffer, 512) != 512) 374 if (read(DEV, buffer, 512) != 512)
375 error_msg_and_die("fatal: first page unreadable\n"); 375 error_msg_and_die("fatal: first page unreadable");
376 if (buffer[508] == 0xDA && buffer[509] == 0xBE) { 376 if (buffer[508] == 0xDA && buffer[509] == 0xBE) {
377 q = (unsigned short *) (buffer + 510); 377 q = (unsigned short *) (buffer + 510);
378 for (sum = 0; q >= (unsigned short *) buffer;) 378 for (sum = 0; q >= (unsigned short *) buffer;)
@@ -381,7 +381,7 @@ int mkswap_main(int argc, char **argv)
381 error_msg("Device '%s' contains a valid Sun disklabel.\n" 381 error_msg("Device '%s' contains a valid Sun disklabel.\n"
382"This probably means creating v0 swap would destroy your partition table\n" 382"This probably means creating v0 swap would destroy your partition table\n"
383"No swap created. If you really want to create swap v0 on that device, use\n" 383"No swap created. If you really want to create swap v0 on that device, use\n"
384"the -f option to force it.\n", device_name); 384"the -f option to force it.", device_name);
385 return EXIT_FAILURE; 385 return EXIT_FAILURE;
386 } 386 }
387 } 387 }
@@ -391,7 +391,7 @@ int mkswap_main(int argc, char **argv)
391 if (version == 0 || check) 391 if (version == 0 || check)
392 check_blocks(); 392 check_blocks();
393 if (version == 0 && !bit_test_and_clear(signature_page, 0)) 393 if (version == 0 && !bit_test_and_clear(signature_page, 0))
394 error_msg_and_die("fatal: first page unreadable\n"); 394 error_msg_and_die("fatal: first page unreadable");
395 if (version == 1) { 395 if (version == 1) {
396 p->version = version; 396 p->version = version;
397 p->last_page = PAGES - 1; 397 p->last_page = PAGES - 1;
@@ -400,23 +400,23 @@ int mkswap_main(int argc, char **argv)
400 400
401 goodpages = PAGES - badpages - 1; 401 goodpages = PAGES - badpages - 1;
402 if (goodpages <= 0) 402 if (goodpages <= 0)
403 error_msg_and_die("Unable to set up swap-space: unreadable\n"); 403 error_msg_and_die("Unable to set up swap-space: unreadable");
404 printf("Setting up swapspace version %d, size = %ld bytes\n", 404 printf("Setting up swapspace version %d, size = %ld bytes\n",
405 version, (long) (goodpages * pagesize)); 405 version, (long) (goodpages * pagesize));
406 write_signature((version == 0) ? "SWAP-SPACE" : "SWAPSPACE2"); 406 write_signature((version == 0) ? "SWAP-SPACE" : "SWAPSPACE2");
407 407
408 offset = ((version == 0) ? 0 : 1024); 408 offset = ((version == 0) ? 0 : 1024);
409 if (lseek(DEV, offset, SEEK_SET) != offset) 409 if (lseek(DEV, offset, SEEK_SET) != offset)
410 error_msg_and_die("unable to rewind swap-device\n"); 410 error_msg_and_die("unable to rewind swap-device");
411 if (write(DEV, (char *) signature_page + offset, pagesize - offset) 411 if (write(DEV, (char *) signature_page + offset, pagesize - offset)
412 != pagesize - offset) 412 != pagesize - offset)
413 error_msg_and_die("unable to write signature page\n"); 413 error_msg_and_die("unable to write signature page");
414 414
415 /* 415 /*
416 * A subsequent swapon() will fail if the signature 416 * A subsequent swapon() will fail if the signature
417 * is not actually on disk. (This is a kernel bug.) 417 * is not actually on disk. (This is a kernel bug.)
418 */ 418 */
419 if (fsync(DEV)) 419 if (fsync(DEV))
420 error_msg_and_die("fsync failed\n"); 420 error_msg_and_die("fsync failed");
421 return EXIT_SUCCESS; 421 return EXIT_SUCCESS;
422} 422}
diff --git a/util-linux/mount.c b/util-linux/mount.c
index f78786ebc..b571e5035 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -132,20 +132,20 @@ do_mount(char *specialfile, char *dir, char *filesystemtype,
132 132
133 specialfile = find_unused_loop_device(); 133 specialfile = find_unused_loop_device();
134 if (specialfile == NULL) { 134 if (specialfile == NULL) {
135 error_msg_and_die("Could not find a spare loop device\n"); 135 error_msg_and_die("Could not find a spare loop device");
136 } 136 }
137 if (set_loop(specialfile, lofile, 0, &loro)) { 137 if (set_loop(specialfile, lofile, 0, &loro)) {
138 error_msg_and_die("Could not setup loop device\n"); 138 error_msg_and_die("Could not setup loop device");
139 } 139 }
140 if (!(flags & MS_RDONLY) && loro) { /* loop is ro, but wanted rw */ 140 if (!(flags & MS_RDONLY) && loro) { /* loop is ro, but wanted rw */
141 error_msg("WARNING: loop device is read-only\n"); 141 error_msg("WARNING: loop device is read-only");
142 flags &= ~MS_RDONLY; 142 flags &= ~MS_RDONLY;
143 } 143 }
144 } 144 }
145#endif 145#endif
146 status = mount(specialfile, dir, filesystemtype, flags, string_flags); 146 status = mount(specialfile, dir, filesystemtype, flags, string_flags);
147 if (errno == EROFS) { 147 if (errno == EROFS) {
148 error_msg("%s is write-protected, mounting read-only\n", specialfile); 148 error_msg("%s is write-protected, mounting read-only", specialfile);
149 status = mount(specialfile, dir, filesystemtype, flags |= MS_RDONLY, string_flags); 149 status = mount(specialfile, dir, filesystemtype, flags |= MS_RDONLY, string_flags);
150 } 150 }
151 } 151 }
@@ -171,7 +171,7 @@ do_mount(char *specialfile, char *dir, char *filesystemtype,
171#endif 171#endif
172 172
173 if (errno == EPERM) { 173 if (errno == EPERM) {
174 error_msg_and_die("permission denied. Are you root?\n"); 174 error_msg_and_die("permission denied. Are you root?");
175 } 175 }
176 176
177 return (FALSE); 177 return (FALSE);
diff --git a/util-linux/nfsmount.c b/util-linux/nfsmount.c
index b260a885f..397858b71 100644
--- a/util-linux/nfsmount.c
+++ b/util-linux/nfsmount.c
@@ -307,7 +307,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
307 msock = fsock = -1; 307 msock = fsock = -1;
308 mclient = NULL; 308 mclient = NULL;
309 if (strlen(spec) >= sizeof(hostdir)) { 309 if (strlen(spec) >= sizeof(hostdir)) {
310 error_msg("excessively long host:dir argument\n"); 310 error_msg("excessively long host:dir argument");
311 goto fail; 311 goto fail;
312 } 312 }
313 strcpy(hostdir, spec); 313 strcpy(hostdir, spec);
@@ -319,10 +319,10 @@ int nfsmount(const char *spec, const char *node, int *flags,
319 until they can be fully supported. (mack@sgi.com) */ 319 until they can be fully supported. (mack@sgi.com) */
320 if ((s = strchr(hostdir, ','))) { 320 if ((s = strchr(hostdir, ','))) {
321 *s = '\0'; 321 *s = '\0';
322 error_msg("warning: multiple hostnames not supported\n"); 322 error_msg("warning: multiple hostnames not supported");
323 } 323 }
324 } else { 324 } else {
325 error_msg("directory to mount not in host:dir format\n"); 325 error_msg("directory to mount not in host:dir format");
326 goto fail; 326 goto fail;
327 } 327 }
328 328
@@ -332,11 +332,11 @@ int nfsmount(const char *spec, const char *node, int *flags,
332#endif 332#endif
333 { 333 {
334 if ((hp = gethostbyname(hostname)) == NULL) { 334 if ((hp = gethostbyname(hostname)) == NULL) {
335 error_msg("can't get address for %s\n", hostname); 335 error_msg("can't get address for %s", hostname);
336 goto fail; 336 goto fail;
337 } else { 337 } else {
338 if (hp->h_length > sizeof(struct in_addr)) { 338 if (hp->h_length > sizeof(struct in_addr)) {
339 error_msg("got bad hp->h_length\n"); 339 error_msg("got bad hp->h_length");
340 hp->h_length = sizeof(struct in_addr); 340 hp->h_length = sizeof(struct in_addr);
341 } 341 }
342 memcpy(&server_addr.sin_addr, 342 memcpy(&server_addr.sin_addr,
@@ -353,7 +353,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
353 if (!old_opts) 353 if (!old_opts)
354 old_opts = ""; 354 old_opts = "";
355 if (strlen(old_opts) + strlen(s) + 10 >= sizeof(new_opts)) { 355 if (strlen(old_opts) + strlen(s) + 10 >= sizeof(new_opts)) {
356 error_msg("excessively long option argument\n"); 356 error_msg("excessively long option argument");
357 goto fail; 357 goto fail;
358 } 358 }
359 sprintf(new_opts, "%s%saddr=%s", 359 sprintf(new_opts, "%s%saddr=%s",
@@ -513,11 +513,11 @@ int nfsmount(const char *spec, const char *node, int *flags,
513 data.flags |= (nolock ? NFS_MOUNT_NONLM : 0); 513 data.flags |= (nolock ? NFS_MOUNT_NONLM : 0);
514#endif 514#endif
515 if (nfsvers > MAX_NFSPROT) { 515 if (nfsvers > MAX_NFSPROT) {
516 error_msg("NFSv%d not supported!\n", nfsvers); 516 error_msg("NFSv%d not supported!", nfsvers);
517 return 0; 517 return 0;
518 } 518 }
519 if (mountvers > MAX_NFSPROT) { 519 if (mountvers > MAX_NFSPROT) {
520 error_msg("NFSv%d not supported!\n", nfsvers); 520 error_msg("NFSv%d not supported!", nfsvers);
521 return 0; 521 return 0;
522 } 522 }
523 if (nfsvers && !mountvers) 523 if (nfsvers && !mountvers)
@@ -577,11 +577,11 @@ int nfsmount(const char *spec, const char *node, int *flags,
577 mount_server_addr.sin_addr.s_addr = inet_addr(hostname); 577 mount_server_addr.sin_addr.s_addr = inet_addr(hostname);
578 } else { 578 } else {
579 if ((hp = gethostbyname(mounthost)) == NULL) { 579 if ((hp = gethostbyname(mounthost)) == NULL) {
580 error_msg("can't get address for %s\n", hostname); 580 error_msg("can't get address for %s", hostname);
581 goto fail; 581 goto fail;
582 } else { 582 } else {
583 if (hp->h_length > sizeof(struct in_addr)) { 583 if (hp->h_length > sizeof(struct in_addr)) {
584 error_msg("got bad hp->h_length?\n"); 584 error_msg("got bad hp->h_length?");
585 hp->h_length = sizeof(struct in_addr); 585 hp->h_length = sizeof(struct in_addr);
586 } 586 }
587 mount_server_addr.sin_family = AF_INET; 587 mount_server_addr.sin_family = AF_INET;
@@ -716,7 +716,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
716 716
717 if (nfsvers == 2) { 717 if (nfsvers == 2) {
718 if (status.nfsv2.fhs_status != 0) { 718 if (status.nfsv2.fhs_status != 0) {
719 error_msg("%s:%s failed, reason given by server: %s\n", 719 error_msg("%s:%s failed, reason given by server: %s",
720 hostname, dirname, 720 hostname, dirname,
721 nfs_strerror(status.nfsv2.fhs_status)); 721 nfs_strerror(status.nfsv2.fhs_status));
722 goto fail; 722 goto fail;
@@ -734,7 +734,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
734#if NFS_MOUNT_VERSION >= 4 734#if NFS_MOUNT_VERSION >= 4
735 fhandle3 *fhandle; 735 fhandle3 *fhandle;
736 if (status.nfsv3.fhs_status != 0) { 736 if (status.nfsv3.fhs_status != 0) {
737 error_msg("%s:%s failed, reason given by server: %s\n", 737 error_msg("%s:%s failed, reason given by server: %s",
738 hostname, dirname, 738 hostname, dirname,
739 nfs_strerror(status.nfsv3.fhs_status)); 739 nfs_strerror(status.nfsv3.fhs_status));
740 goto fail; 740 goto fail;
diff --git a/util-linux/rdate.c b/util-linux/rdate.c
index 0ad339be8..d350be877 100644
--- a/util-linux/rdate.c
+++ b/util-linux/rdate.c
@@ -72,7 +72,7 @@ time_t askremotedate(char *host)
72 } 72 }
73 if (read(fd, (void *)&nett, 4) != 4) { /* read time from server */ 73 if (read(fd, (void *)&nett, 4) != 4) { /* read time from server */
74 close(fd); 74 close(fd);
75 error_msg("%s did not send the complete time\n", host); 75 error_msg("%s did not send the complete time", host);
76 } 76 }
77 close(fd); 77 close(fd);
78 78
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index 8a9134ca0..74f6ec36e 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -95,7 +95,7 @@ extern int swap_on_off_main(int argc, char **argv)
95 struct stat statBuf; 95 struct stat statBuf;
96 96
97 if (stat("/etc/fstab", &statBuf) < 0) 97 if (stat("/etc/fstab", &statBuf) < 0)
98 error_msg_and_die("/etc/fstab file missing\n"); 98 error_msg_and_die("/etc/fstab file missing");
99 } 99 }
100 do_em_all(); 100 do_em_all();
101 break; 101 break;
diff --git a/util-linux/umount.c b/util-linux/umount.c
index 3772d55f0..39842d232 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -81,7 +81,7 @@ void mtab_read(void)
81 return; 81 return;
82 82
83 if ((fp = setmntent(mtab_file, "r")) == NULL) { 83 if ((fp = setmntent(mtab_file, "r")) == NULL) {
84 error_msg("Cannot open %s\n", mtab_file); 84 error_msg("Cannot open %s", mtab_file);
85 return; 85 return;
86 } 86 }
87 while ((e = getmntent(fp))) { 87 while ((e = getmntent(fp))) {
@@ -181,7 +181,7 @@ static int do_umount(const char *name, int useMtab)
181 if (status != 0 && doForce == TRUE) { 181 if (status != 0 && doForce == TRUE) {
182 status = umount2(blockDevice, MNT_FORCE); 182 status = umount2(blockDevice, MNT_FORCE);
183 if (status != 0) { 183 if (status != 0) {
184 error_msg_and_die("forced umount of %s failed!\n", blockDevice); 184 error_msg_and_die("forced umount of %s failed!", blockDevice);
185 } 185 }
186 } 186 }
187#endif 187#endif
@@ -189,9 +189,9 @@ static int do_umount(const char *name, int useMtab)
189 status = mount(blockDevice, name, NULL, 189 status = mount(blockDevice, name, NULL,
190 MS_MGC_VAL | MS_REMOUNT | MS_RDONLY, NULL); 190 MS_MGC_VAL | MS_REMOUNT | MS_RDONLY, NULL);
191 if (status == 0) { 191 if (status == 0) {
192 error_msg("%s busy - remounted read-only\n", blockDevice); 192 error_msg("%s busy - remounted read-only", blockDevice);
193 } else { 193 } else {
194 error_msg("Cannot remount %s read-only\n", blockDevice); 194 error_msg("Cannot remount %s read-only", blockDevice);
195 } 195 }
196 } 196 }
197 if (status == 0) { 197 if (status == 0) {