From: Karel Zak Date: Wed, 6 Dec 2006 23:25:48 +0000 (+0100) Subject: Imported from util-linux-2.11f tarball. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=364cda4857f7dd5e2b4e2eb7583a2eaa279ef4ed;p=util-linux Imported from util-linux-2.11f tarball. --- diff --git a/HISTORY b/HISTORY index 92d6b89e..aa7b46c5 100644 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,85 @@ +util-linux 2.11f + +* Czech messages (Jiøí Pavlovský) +* fdisk: fix for "reorder" expert command + (use of sfdisk afterwards is still recommended) +* mount: minor fixes + +util-linux 2.11e + +* Danish messages (Claus Hindsgaul) +* Brazilian Portuguese messages (Rodrigo Stulzer Lopes) +* agetty: give tty mode 0600 instead of 0622 +* cal: improved manpage +* cfdisk: add user-friendliness in case of empty disk (Matthew Wilcox) +* dmesg: improved manpage +* fdisk: SuperH fix (ISHIKAWA Mutsumi) +* hwclock: accept alpha options in both upper and lower case + (so as to make the man page correct) +* hwclock: add option --noadjtime (Henrique M Holschuh) +* login: child must have controlling tty (Michal Moskal) +* more: don't seek unseekable input (David Whedon) +* mount: upon request by Richard Gooch: if the mount point is specified + as symlink, put symlink, not actual mount point in mtab. + (This avoids the long and ugly devfs names, but may break things. + Please complain in case of problems.) +* mount: with mount -a -t nfs: + if we used fallback to nfs v3, don't do so for subsequent mounts +* mount: add heuristics for ext3 (Andrew Morton) +* mount: added quota info to mount.8 +* mount: allow comma-separated type lists, also in fstab +* raw: small fix for ppc + +util-linux 2.11d + +* fdisk: fix for OSF (Will Woods) +* chsh: compilation fix (Ronald Wahl) + +util-linux 2.11c + +* Czech messages (Jiøí Pavlovský) +* German messages (Elrond) +* Makefile/MCONFIG improvements (Peter Breitenlohner) +* fdisk: added a few partition types +* fdisk: correct partition numbering for sgi partitions (Nathan Scott) +* fdisk: make it compile on hppa by arbitrarily treating hppa like powerpc + (Matt Taggart) +* fsck.minix: improved localisation (Elrond) +* getopt: updated to version 1.1.2 (Frodo Looijaard) +* hwclock: fixes for IA64 (Thorsten Kukuk) +* hwclock: use /dev/vc/1 when devfs is used (Thomas Koeller) +* hwclock: more devfs support (e.g. /dev/misc/rtc) +* ipcs: add spaces in output (DeWitt Clinton), + correct some error messages (Bobby de Vos) +* login: fix TIOCNOTTY (Andreas Haumer, Adam J. Richter) +* login: add btmp logging of unsuccessful login attempts (Erik Troan) +* login: avoid a SIGHUP race with PAM enabled (Peter 'Luna' Runestig) +* login: copy the static result returned by gethostbyname to avoid + corruption by pam_authenticate via pam_ldap (Andreas Damm) +* login: removed the REDHAT_IGNORED_MAILSIZE hack +* login: unconditionally do vhangup +* login: zero PAM_USER when no username was given (Arkadiusz Miskiewicz) +* look: dictionary now under /usr/share (Erik Troan) +* mount: add sanitize_env() (Solar Designer) +* mount: another heuristic for vfat (Michal Svec) +* mount: xfs magic has only one endianness (Nathan Scott) +* mount: return failure when tcp used and portmap returns 0 (H. J. Lu) +* rdev: allow unlimited recursion to find the long devfs names + Also, allow major,minor pair the specify device (request by Russell Coker) +* readprofile: array bound check (Andrew Morton) +* script: transmit window changes to child (Joey Hess) +* sfdisk: endian fix for ppc (Gregory Geiselhart) +* sfdisk: new feature: sign is offset from default (Byron Stanoszek) +* sfdisk: add some default devices to list (Luca Montecchiani) +* sfdisk: no partition table on ide tape +* shutdown: close files, unblock signals (Richard Gooch) +* simpleinit: block signals in handlers; add no_reboot option (Richard Gooch) +* swapdev: deleted, it was last used with Linux 0.12. +* umount: mips does support umount2 (Maciej W. Rozycki) +* umount: add sanitize_env() (Solar Designer) +* umount: fix exit status +* wall: do not forget 80th character (Thorsten Kukuk) + util-linux 2.11b: * Danish messages (Claus Hindsgaul) diff --git a/MAINTAINER b/MAINTAINER index 7fdaafc1..62bbe82e 100644 --- a/MAINTAINER +++ b/MAINTAINER @@ -1,4 +1,5 @@ Maintainer: Andries Brouwer Maintainer address: util-linux@math.uio.no +Maintainer of getopt: Frodo Looijaard Maintainer of simpleinit: Richard Gooch diff --git a/MCONFIG b/MCONFIG index e53915ab..51f3b987 100644 --- a/MCONFIG +++ b/MCONFIG @@ -52,6 +52,11 @@ HAVE_SYSVINIT=yes # mesg, and wall from that package.) HAVE_SYSVINIT_UTILS=yes +# If HAVE_WRITE is set to "yes", then write will not be built or +# installed from the misc-utils subdirectory. +# (There is a network aware write in netwrite from NetKit 0.16 or later.) +HAVE_WRITE=no + # If HAVE_GETTY is set to "yes", then agetty will not be built or # installed from the login-utils subdirectory. Note that agetty can # co-exist with other gettys, so this option should never be used. @@ -83,6 +88,9 @@ HAVE_SLN=no # If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed. HAVE_FDUTILS=no +# This enables building of raw +# ADD_RAW=yes + # Different optimizations for different cpus. ifeq "$(ARCH)" "intel" ifeq "$(CPU)" "i386" @@ -114,37 +122,55 @@ ERR_O=$(LIB)/err.o # (no extra definition required). LIBSLANG=-lslang -DEVDIR= $(DESTDIR)/dev -ETCDIR= $(DESTDIR)/etc -SBINDIR= $(DESTDIR)/sbin -USRSBINDIR= $(DESTDIR)/usr/sbin -USRLIBDIR= $(DESTDIR)/usr/lib -USRBINDIR= $(DESTDIR)/usr/bin -USRGAMESDIR= $(DESTDIR)/usr/games -USRSHAREMISCDIR=$(DESTDIR)/usr/share/misc -LOCALEDIR= $(DESTDIR)/usr/share/locale -BINDIR= $(DESTDIR)/bin -VARPATH= $(DESTDIR)/var -LOGDIR= $(DESTDIR)/var/log -MANDIR= $(DESTDIR)/usr/man +# +# Paths used for compilation (not all are actually used, see CFLAGS below) +# +DEV_DIR= /dev +ETC_DIR= /etc +SBIN_DIR= /sbin +USRSBIN_DIR= /usr/sbin +USRLIB_DIR= /usr/lib +USRBIN_DIR= /usr/bin +USRGAMES_DIR= /usr/games +USRSHAREMISC_DIR=/usr/share/misc +LOCALE_DIR= /usr/share/locale +BIN_DIR= /bin +VAR_PATH= /var +LOG_DIR= /var/log +MAN_DIR= /usr/share/man +INFO_DIR= /usr/share/info + +# Directory for help file for more. Used to be /usr/lib. +MOREHELP_DIR= $(USRSHAREMISC_DIR) + +# +# Paths used for install +# +DEVDIR= $(DESTDIR)$(DEV_DIR) +ETCDIR= $(DESTDIR)$(ETC_DIR) +SBINDIR= $(DESTDIR)$(SBIN_DIR) +USRSBINDIR= $(DESTDIR)$(USRSBIN_DIR) +USRLIBDIR= $(DESTDIR)$(USRLIB_DIR) +USRBINDIR= $(DESTDIR)$(USRBIN_DIR) +USRGAMESDIR= $(DESTDIR)$(USRGAMES_DIR) +USRSHAREMISCDIR=$(DESTDIR)$(USRSHAREMISC_DIR) +LOCALEDIR= $(DESTDIR)$(LOCALE_DIR) +BINDIR= $(DESTDIR)$(BIN_DIR) +VARPATH= $(DESTDIR)$(VAR_PATH) +LOGDIR= $(DESTDIR)$(LOG_DIR) +MANDIR= $(DESTDIR)$(MAN_DIR) MAN1DIR= $(MANDIR)/man1 MAN3DIR= $(MANDIR)/man3 MAN5DIR= $(MANDIR)/man5 MAN6DIR= $(MANDIR)/man6 MAN8DIR= $(MANDIR)/man8 -INFODIR= $(DESTDIR)/usr/info +INFODIR= $(DESTDIR)$(INFO_DIR) # Directory for shutdown, halt, reboot, etc. SHUTDOWNDIR= $(SBINDIR) -# Directory for fsck -FSCKDIR= $(SBINDIR) - -# Directory for passwd -PASSWDDIR= $(USRBINDIR) - # Directory for help file for more. Used to be /usr/lib. -MOREHELPDIR= $(USRSHAREMISCDIR) +MOREHELPDIR= $(DESTDIR)$(MOREHELP_DIR) # Modes DIRMODE= 755 @@ -165,11 +191,11 @@ INSTALLSUID= $(INSTALL) -m $(SUIDMODE) -o root CFLAGS := $(CFLAGS) $(OPT) -I$(LIB) $(WARNFLAGS) \ $(CURSESFLAGS) $(SLANGFLAGS) \ -D_FILE_OFFSET_BITS=64 \ - -DSBINDIR=\"$(SBINDIR)\" \ - -DUSRSBINDIR=\"$(USRSBINDIR)\" \ - -DLOGDIR=\"$(LOGDIR)\" \ - -DVARPATH=\"$(VARPATH)\" \ - -DLOCALEDIR=\"$(LOCALEDIR)\" + -DSBINDIR=\"$(SBIN_DIR)\" \ + -DUSRSBINDIR=\"$(USRSBIN_DIR)\" \ + -DLOGDIR=\"$(LOG_DIR)\" \ + -DVARPATH=\"$(VAR_PATH)\" \ + -DLOCALEDIR=\"$(LOCALE_DIR)\" %.o: %.c diff --git a/Makefile b/Makefile index 0cca8433..4423f499 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ include ./MCONFIG SUBDIRS=po \ lib \ - getopt-1.1.0a \ + getopt-1.1.2 \ disk-utils \ games \ login-utils \ @@ -44,7 +44,7 @@ install: clean: -rm -f *.o *~ omake conftest conftest.c core - @for subdir in $(SUBDIRS); do \ + @for subdir in $(SUBDIRS) partx; do \ (cd $$subdir && $(MAKE) $@) || exit 1; \ done diff --git a/VERSION b/VERSION index 5b0f3c85..009a3e75 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.11b +2.11f diff --git a/disk-utils/fsck.minix.c b/disk-utils/fsck.minix.c index e36594aa..7f5de735 100644 --- a/disk-utils/fsck.minix.c +++ b/disk-utils/fsck.minix.c @@ -322,7 +322,7 @@ check_zone_nr(unsigned short * nr, int * corrected) { else return *nr; print_current_name(); - printf("'."); + printf(_("'.")); if (ask(_("Remove block"),1)) { *nr = 0; *corrected = 1; @@ -342,7 +342,7 @@ check_zone_nr2 (unsigned int *nr, int *corrected) { else return *nr; print_current_name (); - printf ("'."); + printf (_("'.")); if (ask (_("Remove block"), 1)) { *nr = 0; *corrected = 1; @@ -363,13 +363,13 @@ read_block(unsigned int nr, char * addr) { if (BLOCK_SIZE*nr != lseek(IN, BLOCK_SIZE*nr, SEEK_SET)) { printf(_("Read error: unable to seek to block in file '")); print_current_name(); - printf("'\n"); + printf(_("'\n")); memset(addr,0,BLOCK_SIZE); errors_uncorrected = 1; } else if (BLOCK_SIZE != read(IN, addr, BLOCK_SIZE)) { printf(_("Read error: bad block in file '")); print_current_name(); - printf("'\n"); + printf(_("'\n")); memset(addr,0,BLOCK_SIZE); errors_uncorrected = 1; } @@ -393,7 +393,7 @@ write_block(unsigned int nr, char * addr) { if (BLOCK_SIZE != write(IN, addr, BLOCK_SIZE)) { printf(_("Write error: bad block in file '")); print_current_name(); - printf("'\n"); + printf(_("'\n")); errors_uncorrected = 1; } } @@ -637,10 +637,10 @@ get_inode(unsigned int nr) { inode = Inode + nr; if (!inode_count[nr]) { if (!inode_in_use(nr)) { - printf(_("Inode %d marked not used, but used for file '"), - nr); + printf(_("Inode %d marked not used, " + "but used for file '"), nr); print_current_name(); - printf("'\n"); + printf(_("'\n")); if (repair) { if (ask(_("Mark in use"),1)) mark_inode(nr); @@ -688,9 +688,10 @@ get_inode2 (unsigned int nr) { inode = Inode2 + nr; if (!inode_count[nr]) { if (!inode_in_use (nr)) { - printf (_("Inode %d marked not used, but used for file '"), nr); + printf (_("Inode %d marked not used, " + "but used for file '"), nr); print_current_name (); - printf ("'\n"); + printf (_("'\n")); if (repair) { if (ask (_("Mark in use"), 1)) mark_inode (nr); @@ -755,7 +756,7 @@ add_zone(unsigned short * znr, int * corrected) { if (zone_count[block]) { printf(_("Block has been used before. Now in file `")); print_current_name(); - printf("'."); + printf(_("'.")); if (ask(_("Clear"),1)) { *znr = 0; block = 0; @@ -789,7 +790,7 @@ add_zone2 (unsigned int *znr, int *corrected) { if (zone_count[block]) { printf (_("Block has been used before. Now in file `")); print_current_name (); - printf ("'."); + printf (_("'.")); if (ask (_("Clear"), 1)) { *znr = 0; block = 0; @@ -947,9 +948,10 @@ check_file(struct minix_inode * dir, unsigned int offset) { name = blk + (offset % BLOCK_SIZE) + 2; ino = * (unsigned short *) (name-2); if (ino > INODES) { + printf(_("The directory '")); print_current_name(); - printf(_(" contains a bad inode number for file '")); - printf("%.*s'.",namelen,name); + printf(_("' contains a bad inode number for file '%.*s'."), + namelen, name); if (ask(_(" Remove"),1)) { *(unsigned short *)(name-2) = 0; write_block(block, blk); @@ -982,7 +984,8 @@ check_file(struct minix_inode * dir, unsigned int offset) { name_depth++; if (list) { if (verbose) - printf("%6d %07o %3d ",ino,inode->i_mode,inode->i_nlinks); + printf("%6d %07o %3d ", ino, + inode->i_mode, inode->i_nlinks); print_current_name(); if (S_ISDIR(inode->i_mode)) printf(":\n"); @@ -1010,9 +1013,10 @@ check_file2 (struct minix2_inode *dir, unsigned int offset) { name = blk + (offset % BLOCK_SIZE) + 2; ino = *(unsigned short *) (name - 2); if (ino > INODES) { + printf(_("The directory '")); print_current_name (); - printf (_(" contains a bad inode number for file '")); - printf ("%.*s'.", namelen, name); + printf (_("' contains a bad inode number for file '%.*s'.", + namelen, name); if (ask (_(" Remove"), 1)) { *(unsigned short *) (name - 2) = 0; write_block (block, blk); @@ -1070,7 +1074,7 @@ recursive_check(unsigned int ino) { die(_("internal error")); if (dir->i_size < 2 * dirsize) { print_current_name(); - printf(_(": bad directory: size<32")); + printf(_(": bad directory: size < 32")); errors_uncorrected = 1; } for (offset = 0 ; offset < dir->i_size ; offset += dirsize) diff --git a/disk-utils/raw.c b/disk-utils/raw.c index 4fc5e247..6e20fe26 100644 --- a/disk-utils/raw.c +++ b/disk-utils/raw.c @@ -58,7 +58,7 @@ static void usage(int err) int main(int argc, char *argv[]) { - char c; + int c; char * raw_name; char * block_name; int err; diff --git a/fdisk/cfdisk.c b/fdisk/cfdisk.c index 8b5643e6..d9ef3f63 100644 --- a/fdisk/cfdisk.c +++ b/fdisk/cfdisk.c @@ -1431,8 +1431,23 @@ get_partition_table_geometry(partition_table *bufp) { int bad = FALSE; if (bufp->p.magicflag[0] != PART_TABLE_FLAG0 || - bufp->p.magicflag[1] != PART_TABLE_FLAG1) - fatal(_("Bad signature on partition table"), 3); + bufp->p.magicflag[1] != PART_TABLE_FLAG1) { + /* Matthew Wilcox: slightly friendlier version of + fatal(_("Bad signature on partition table"), 3); + */ + int cont; + mvaddstr(WARNING_START, 0, + _("No partition table or unknown signature on partition table")); + mvaddstr(WARNING_START+1, 0, + _("Do you wish to start with a zero table [y/N] ?")); + putchar(BELL); + refresh(); + cont = getch(); + if ((cont != 'y') && (cont != 'Y')) + die_x(3); + zero_table = TRUE; + return; + } hh = ss = 0; for (i=0; i<4; i++) { diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c index a439f327..0c57ed22 100644 --- a/fdisk/fdisk.c +++ b/fdisk/fdisk.c @@ -517,8 +517,17 @@ clear_partition(struct partition *p) { } static void -set_partition(int i, struct partition *p, uint start, uint stop, - int sysid, uint offset) { +set_partition(int i, int doext, uint start, uint stop, int sysid) { + struct partition *p; + uint offset; + + if (doext) { + p = ptes[i].ext_pointer; + offset = extended_offset; + } else { + p = ptes[i].part_table; + offset = ptes[i].offset; + } p->boot_ind = 0; p->sys_ind = sysid; set_start_sect(p, start - offset); @@ -1157,14 +1166,7 @@ delete_partition(int i) { if (i > 4) { /* delete this link in the chain */ p = ptes[i-1].ext_pointer; - p->boot_ind = 0; - p->head = q->head; - p->sector = q->sector; - p->cyl = q->cyl; - p->sys_ind = EXTENDED; - p->end_head = q->end_head; - p->end_sector = q->end_sector; - p->end_cyl = q->end_cyl; + *p = *q; set_start_sect(p, get_start_sect(q)); set_nr_sects(p, get_nr_sects(q)); ptes[i-1].changed = 1; @@ -1370,9 +1372,72 @@ wrong_p_order(int *prev) { return 0; } +/* + * Fix the chain of logicals. + * extended_offset is unchanged, the set of sectors used is unchanged + * The chain is sorted so that sectors increase, and so that + * starting sectors increase. + * + * After this it may still be that cfdisk doesnt like the table. + * (This is because cfdisk considers expanded parts, from link to + * end of partition, and these may still overlap.) + * Now + * sfdisk /dev/hda > ohda; sfdisk /dev/hda < ohda + * may help. + */ +static void +fix_chain_of_logicals(void) { + int j, oj, ojj, sj, sjj; + struct partition *pj,*pjj,tmp; + + /* Stage 1: sort sectors but leave sector of part 4 */ + /* (Its sector is the global extended_offset.) */ + stage1: + for(j = 5; j < partitions-1; j++) { + oj = ptes[j].offset; + ojj = ptes[j+1].offset; + if (oj > ojj) { + ptes[j].offset = ojj; + ptes[j+1].offset = oj; + pj = ptes[j].part_table; + set_start_sect(pj, get_start_sect(pj)+oj-ojj); + pjj = ptes[j+1].part_table; + set_start_sect(pjj, get_start_sect(pjj)+ojj-oj); + set_start_sect(ptes[j-1].ext_pointer, + ojj-extended_offset); + set_start_sect(ptes[j].ext_pointer, + oj-extended_offset); + goto stage1; + } + } + + /* Stage 2: sort starting sectors */ + stage2: + for(j = 4; j < partitions-1; j++) { + pj = ptes[j].part_table; + pjj = ptes[j+1].part_table; + sj = get_start_sect(pj); + sjj = get_start_sect(pjj); + oj = ptes[j].offset; + ojj = ptes[j+1].offset; + if (oj+sj > ojj+sjj) { + tmp = *pj; + *pj = *pjj; + *pjj = tmp; + set_start_sect(pj, ojj+sjj-oj); + set_start_sect(pjj, oj+sj-ojj); + goto stage2; + } + } + + /* Probably something was changed */ + for(j = 4; j < partitions; j++) + ptes[j].changed = 1; +} + static void fix_partition_table_order(void) { - struct pte *pei, *pek, ptebuf; + struct pte *pei, *pek; int i,k; if(!wrong_p_order(NULL)) { @@ -1380,34 +1445,32 @@ fix_partition_table_order(void) { return; } - while ((i = wrong_p_order(&k)) != 0) { + while ((i = wrong_p_order(&k)) != 0 && i < 4) { /* partition i should have come earlier, move it */ + /* We have to move data in the MBR */ + struct partition *pi, *pk, *pe, pbuf; pei = &ptes[i]; pek = &ptes[k]; - if (i < 4) { - /* We have to move data in the MBR */ - struct partition *pi, *pk, *pe, pbuf; + pe = pei->ext_pointer; + pei->ext_pointer = pek->ext_pointer; + pek->ext_pointer = pe; - pe = pei->ext_pointer; - pei->ext_pointer = pek->ext_pointer; - pek->ext_pointer = pe; + pi = pei->part_table; + pk = pek->part_table; - pi = pei->part_table; - pk = pek->part_table; + memmove(&pbuf, pi, sizeof(struct partition)); + memmove(pi, pk, sizeof(struct partition)); + memmove(pk, &pbuf, sizeof(struct partition)); - memmove(&pbuf, pi, sizeof(struct partition)); - memmove(pi, pk, sizeof(struct partition)); - memmove(pk, &pbuf, sizeof(struct partition)); - } else { - /* Only change is change in numbering */ - ptebuf = *pei; - *pei = *pek; - *pek = ptebuf; - } pei->changed = pek->changed = 1; - } + + if (i) + fix_chain_of_logicals(); + + printf("Done.\n"); + } static void @@ -1637,7 +1700,7 @@ add_partition(int n, int sys) { if (p && p->sys_ind) { printf(_("Partition %d is already defined. Delete " - "it before re-adding it.\n"), n + 1); + "it before re-adding it.\n"), n + 1); return; } fill_bounds(first, last); @@ -1693,9 +1756,9 @@ add_partition(int n, int sys) { pe->offset = start - sector_offset; if (pe->offset == extended_offset) { /* must be corrected */ - pe->offset++; - if (sector_offset == 1) - start++; + pe->offset++; + if (sector_offset == 1) + start++; } } @@ -1728,7 +1791,9 @@ add_partition(int n, int sys) { } } - set_partition(n, p, start, stop, sys, ptes[n].offset); + set_partition(n, 0, start, stop, sys); + if (n > 4) + set_partition(n - 1, 1, ptes[n].offset, stop, EXTENDED); if (IS_EXTENDED (sys)) { struct pte *pe4 = &ptes[4]; @@ -1743,16 +1808,6 @@ add_partition(int n, int sys) { pe4->ext_pointer = pe4->part_table + 1; pe4->changed = 1; partitions = 5; - } else { - if (n > 4) - set_partition(n - 1, ptes[n-1].ext_pointer, - ptes[n].offset, stop, EXTENDED, - extended_offset); -#if 0 - if ((limit = get_nr_sects(p)) & 1) - printf(_("Warning: partition %d has an odd " - "number of sectors.\n"), n + 1); -#endif } } diff --git a/fdisk/fdiskbsdlabel.c b/fdisk/fdiskbsdlabel.c index 80efc36e..0522d365 100644 --- a/fdisk/fdiskbsdlabel.c +++ b/fdisk/fdiskbsdlabel.c @@ -104,6 +104,7 @@ static struct xbsd_disklabel xbsd_dlabel; int check_osf_label(void) { + osf_label = 0; if (xbsd_readlabel (NULL, &xbsd_dlabel) == 0) return 0; osf_label = 1; @@ -265,10 +266,10 @@ xbsd_new_part (void) if (!xbsd_check_new_partition (&i)) return; -#if !defined (__alpha__) && !defined (__powerpc__) +#if !defined (__alpha__) && !defined (__powerpc__) && !defined (__hppa__) begin = get_start_sect(xbsd_part); end = begin + get_nr_sects(xbsd_part) - 1; -#elif defined (__alpha__) || defined (__powerpc__) +#else begin = 0; end = xbsd_dlabel.d_secperunit - 1; #endif @@ -419,7 +420,7 @@ xbsd_create_disklabel (void) { c = read_char (_("Do you want to create a disklabel? (y/n) ")); if (tolower(c) == 'y') { if (xbsd_initlabel ( -#if defined (__alpha__) || defined (__powerpc__) +#if defined (__alpha__) || defined (__powerpc__) || defined (__hppa__) NULL, &xbsd_dlabel, 0 #else xbsd_part, &xbsd_dlabel, xbsd_part_index @@ -548,7 +549,7 @@ xbsd_write_bootstrap (void) bcopy (&dl, d, sizeof (struct xbsd_disklabel)); -#if defined (__powerpc__) +#if defined (__powerpc__) || defined (__hppa__) sector = 0; #elif defined (__alpha__) sector = 0; @@ -748,9 +749,9 @@ xbsd_writelabel (struct partition *p, struct xbsd_disklabel *d) { int sector; -#if !defined (__alpha__) && !defined (__powerpc__) +#if !defined (__alpha__) && !defined (__powerpc__) && !defined (__hppa__) sector = get_start_sect(p) + BSD_LABELSECTOR; -#elif defined (__alpha__) || defined (__powerpc__) +#else sector = BSD_LABELSECTOR; #endif diff --git a/fdisk/fdiskbsdlabel.h b/fdisk/fdiskbsdlabel.h index e46e0261..c2e4bb98 100644 --- a/fdisk/fdiskbsdlabel.h +++ b/fdisk/fdiskbsdlabel.h @@ -43,10 +43,10 @@ #define BSD_LINUX_BOOTDIR "/usr/ucb/mdec" -#if defined (i386) || defined (__sparc__) || defined (__arm__) || defined (__mips__) +#if defined (i386) || defined (__sparc__) || defined (__arm__) || defined (__mips__) || defined (__s390__) || defined (__sh__) #define BSD_LABELSECTOR 1 #define BSD_LABELOFFSET 0 -#elif defined (__alpha__) || defined (__powerpc__) || defined (__ia64__) +#elif defined (__alpha__) || defined (__powerpc__) || defined (__ia64__) || defined (__hppa__) #define BSD_LABELSECTOR 0 #define BSD_LABELOFFSET 64 #else diff --git a/fdisk/fdisksgilabel.c b/fdisk/fdisksgilabel.c index 09296905..88afcd86 100644 --- a/fdisk/fdisksgilabel.c +++ b/fdisk/fdisksgilabel.c @@ -193,12 +193,12 @@ check_sgi_label() { void sgi_list_table( int xtra ) { int i, w; + int kpi = 0; /* kernel partition ID */ char *type; w = strlen( disk_device ); - if( xtra ) - { + if( xtra ) { printf(_("\nDisk %s (SGI disk label): %d heads, %d sectors\n" "%d cylinders, %d physical cylinders\n" "%d extra sects/cyl, interleave %d:1\n" @@ -210,8 +210,7 @@ sgi_list_table( int xtra ) { SSWAP16(sgiparam.ilfact), (char *)sgilabel, str_units(PLURAL), units_per_sector); - } else - { + } else { printf( _("\nDisk %s (SGI disk label): " "%d heads, %d sectors, %d cylinders\n" "Units = %s of %d * 512 bytes\n\n"), @@ -219,17 +218,17 @@ sgi_list_table( int xtra ) { str_units(PLURAL), units_per_sector ); } printf(_("----- partitions -----\n" - "%*s Info Start End Sectors Id System\n"), + "Pt# %*s Info Start End Sectors Id System\n"), w + 1, _("Device")); - for (i = 0 ; i < partitions; i++) - { - if( sgi_get_num_sectors(i) || debug ) - { + for (i = 0 ; i < partitions; i++) { + if( sgi_get_num_sectors(i) || debug ) { __u32 start = sgi_get_start_sector(i); __u32 len = sgi_get_num_sectors(i); + kpi++; /* only count nonempty partitions */ printf( - "%*s%-2d %4s %9ld %9ld %9ld %2x %s\n", -/* device */ w, disk_device, i + 1, + "%2d: %s %4s %9ld %9ld %9ld %2x %s\n", +/* fdisk part number */ i+1, +/* device */ partname(disk_device, kpi, w+2), /* flags */ (sgi_get_swappartition() == i) ? "swap" : /* flags */ (sgi_get_bootpartition() == i) ? "boot" : " ", /* start */ (long) scround(start), @@ -240,8 +239,8 @@ sgi_list_table( int xtra ) { ? type : _("Unknown")); } } - printf(_("----- bootinfo -----\nBootfile: %s\n" - "----- directory entries -----\n"), + printf(_("----- Bootinfo -----\nBootfile: %s\n" + "----- Directory Entries -----\n"), sgilabel->boot_file ); for (i = 0 ; i < volumes; i++) { @@ -735,11 +734,9 @@ create_sgilabel(void) _("Building a new SGI disklabel. Changes will remain in memory only,\n" "until you decide to write them. After that, of course, the previous\n" "content will be unrecoverably lost.\n\n")); -#if BYTE_ORDER == LITTLE_ENDIAN - other_endian = 1; -#else - other_endian = 0; -#endif + + other_endian = (BYTE_ORDER == LITTLE_ENDIAN); + #ifdef HDIO_REQ if (!ioctl(fd, HDIO_REQ, &geometry)) #else diff --git a/fdisk/fdisksunlabel.c b/fdisk/fdisksunlabel.c index 2a36852a..ff54ed5b 100644 --- a/fdisk/fdisksunlabel.c +++ b/fdisk/fdisksunlabel.c @@ -52,6 +52,9 @@ struct systypes sun_sys_types[] = { {LINUX_SWAP, N_("Linux swap")}, {LINUX_NATIVE, N_("Linux native")}, {0x8e, N_("Linux LVM")}, + {0xfd, N_("Linux raid autodetect")},/* New (2.2.x) raid partition + with autodetect using + persistent superblock */ { 0, NULL } }; @@ -531,6 +534,22 @@ add_sun_partition(int n, int sys) { printf ("\ It is highly recommended that the third partition covers the whole disk\n\ and is of type `Whole disk'\n"); + /* ewt asks to add: "don't start a partition at cyl 0" + However, edmundo@rano.demon.co.uk writes: + "In addition to having a Sun partition table, to be able to + boot from the disc, the first partition, /dev/sdX1, must + start at cylinder 0. This means that /dev/sdX1 contains + the partition table and the boot block, as these are the + first two sectors of the disc. Therefore you must be + careful what you use /dev/sdX1 for. In particular, you must + not use a partition starting at cylinder 0 for Linux swap, + as that would overwrite the partition table and the boot + block. You may, however, use such a partition for a UFS + or EXT2 file system, as these file systems leave the first + 1024 bytes undisturbed. */ + /* On the other hand, one should not use partitions + starting at block 0 in an md, or the label will + be trashed. */ for (i = 0; i < partitions; i++) if (lens[i] && starts[i] <= first && starts[i] + lens[i] > first) diff --git a/fdisk/i386_sys_types.c b/fdisk/i386_sys_types.c index ce01b189..87639c6b 100644 --- a/fdisk/i386_sys_types.c +++ b/fdisk/i386_sys_types.c @@ -24,7 +24,7 @@ struct systypes i386_sys_types[] = { {0x14, N_("Hidden FAT16 <32M")}, {0x16, N_("Hidden FAT16")}, {0x17, N_("Hidden HPFS/NTFS")}, - {0x18, N_("AST Windows swapfile")}, + {0x18, N_("AST SmartSleep")}, {0x1b, N_("Hidden Win95 FAT32")}, {0x1c, N_("Hidden Win95 FAT32 (LBA)")}, {0x1e, N_("Hidden Win95 FAT16 (LBA)")}, @@ -69,6 +69,7 @@ struct systypes i386_sys_types[] = { {0xa7, N_("NeXTSTEP")}, {0xb7, N_("BSDI fs")}, {0xb8, N_("BSDI swap")}, + {0xbb, N_("Boot Wizard hidden")}, {0xc1, N_("DRDOS/sec (FAT-12)")}, {0xc4, N_("DRDOS/sec (FAT-16 < 32M)")}, {0xc6, N_("DRDOS/sec (FAT-16)")}, @@ -77,6 +78,7 @@ struct systypes i386_sys_types[] = { {0xdb, N_("CP/M / CTOS / ...")},/* CP/M or Concurrent CP/M or Concurrent DOS or CTOS */ {0xde, N_("Dell Utility")}, /* Dell PowerEdge Server utilities */ + {0xdf, N_("BootIt")}, /* BootIt EMBRM */ {0xe1, N_("DOS access")}, /* DOS access or SpeedStor 12-bit FAT extended partition */ {0xe3, N_("DOS R/O")}, /* DOS R/O or SpeedStor */ diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c index e6025984..db1b7f4d 100644 --- a/fdisk/sfdisk.c +++ b/fdisk/sfdisk.c @@ -220,12 +220,12 @@ get_sector(char *dev, int fd, unsigned long sno) { static int msdos_signature (struct sector *s) { - if (*(unsigned short *) (s->data + 0x1fe) != 0xaa55) { - error(_("ERROR: sector %lu does not have an msdos signature\n"), - s->sectornumber); - return 0; - } - return 1; + unsigned char *data = s->data; + if (data[510] == 0x55 && data[511] == 0xaa) + return 1; + error(_("ERROR: sector %lu does not have an msdos signature\n"), + s->sectornumber); + return 0; } static int @@ -1146,9 +1146,10 @@ partitions_ok(struct disk_desc *z) { for (q = partitions; q < partitions+partno; q++) if (is_extended(q->p.sys_type)) if (p->start <= q->start && p->start + p->size > q->start) { - warn(_("Warning: partition %s contains part of "), PNO(p)); - warn(_("the partition table (sector %lu),\n"), q->start); - warn(_("and will destroy it when filled\n")); + warn(_("Warning: partition %s contains part of " + "the partition table (sector %lu),\n" + "and will destroy it when filled\n"), + PNO(p), q->start); return 0; } @@ -1161,7 +1162,8 @@ partitions_ok(struct disk_desc *z) { return 0; } if (p->size && p->start + p->size > ds) { - warn(_("Warning: partition %s extends past end of disk\n"), PNO(p)); + warn(_("Warning: partition %s extends past end of disk\n"), + PNO(p)); return 0; } } @@ -1175,8 +1177,8 @@ partitions_ok(struct disk_desc *z) { if (p->p.sys_type == EXTENDED_PARTITION) ect++; if (ect > 1 && !Linux) { - warn(_("Among the primary partitions, at most one can be extended\n")); - warn(_(" (although this is not a problem under Linux)\n")); + warn(_("Among the primary partitions, at most one can be extended\n" + " (although this is not a problem under Linux)\n")); return 0; } } @@ -1284,13 +1286,15 @@ extended_partition(char *dev, int fd, struct part_desc *ep, struct disk_desc *z) /* This is BAD */ if (DOS_extended) { here = start -= (start % B.cylindersize); - printf(_("Warning: shifted start of the extd partition from %ld to %ld\n"), + printf(_("Warning: shifted start of the extd partition " + "from %ld to %ld\n" + "(For listing purposes only. " + "Do not change its contents.)\n"), ep->start, start); - printf(_("(For listing purposes only. Do not change its contents.)\n")); } else { printf(_("Warning: extended partition does not start at a " - "cylinder boundary.\n")); - printf(_("DOS and Linux will interpret the contents differently.\n")); + "cylinder boundary.\n" + "DOS and Linux will interpret the contents differently.\n")); } } @@ -1542,7 +1546,8 @@ write_partitions(char *dev, int fd, struct disk_desc *z) { if (!s) return 0; s->to_be_written = 1; copy_from_part(&(p->p), s->data + p->offset); - *(unsigned short *)(&(s->data[0x1fe])) = 0xaa55; + s->data[510] = 0x55; + s->data[511] = 0xaa; } if (save_sector_file) { if (!save_sectors(dev, fd)) { @@ -1701,13 +1706,23 @@ read_stdin(unsigned char **fields, unsigned char *line, int fieldssize, int line } /* read a number, use default if absent */ +/* a sign gives an offset from the default */ static int get_ul(char *u, unsigned long *up, unsigned long def, int base) { char *nu; + int sign = 0; + unsigned long val; + if (*u == '+') { + sign = 1; + u++; + } else if (*u == '-') { + sign = -1; + u++; + } if (*u) { errno = 0; - *up = strtoul(u, &nu, base); + val = strtoul(u, &nu, base); if (errno == ERANGE) { printf(_("number too big\n")); return -1; @@ -1716,6 +1731,11 @@ get_ul(char *u, unsigned long *up, unsigned long def, int base) { printf(_("trailing junk after number\n")); return -1; } + if (sign == 1) + val = def + val; + else if (sign == -1) + val = def - val; + *up = val; } else *up = def; return 0; @@ -2277,18 +2297,27 @@ static const struct option long_opts[] = { { NULL, 0, NULL, 0 } }; -/* default devices to list */ +/* default devices to list - will be removed */ static struct devd { char *pref, *letters; } defdevs[] = { { "hd", "abcdefgh" }, { "sd", "abcde" }, { "xd", "ab" }, - { "ed", "abcd" } + { "ed", "abcd" }, + /* Compaq's SMART Array Controllers */ + { "cciss/c0d", "01234567" }, + { "cciss/c1d", "01234567" }, + /* Compaq's SMART2 Intelligent Disk Array Controllers */ + { "ida/c0d", "01234567" }, + { "ida/c1d", "01234567" }, + /* Mylex DAC960/AcceleRAID/eXtremeRAID PCI RAID Controllers */ + { "rd/c0d", "01234567" }, + { "rd/c1d", "01234567" } }; static int -is_ide_cdrom(char *device) { +is_ide_cdrom_or_tape(char *device) { /* No device was given explicitly, and we are trying some likely things. But opening /dev/hdc may produce errors like "hdc: tray open or drive not ready" @@ -2302,7 +2331,7 @@ is_ide_cdrom(char *device) { sprintf(buf, "/proc/ide/%s/media", device+5); procf = fopen(buf, "r"); if (procf != NULL && fgets(buf, sizeof(buf), procf)) - return !strncmp(buf, "cdrom", 5); + return !strncmp(buf, "cdrom", 5) || !strncmp(buf, "tape", 4); /* Now when this proc file does not exist, skip the device when it is read-only. */ @@ -2456,7 +2485,7 @@ main(int argc, char **argv) { lp = dp->letters; while(*lp) { sprintf(device, "/dev/%s%c", dp->pref, *lp++); - if (!strcmp(dp->pref, "hd") && is_ide_cdrom(device)) + if (!strcmp(dp->pref, "hd") && is_ide_cdrom_or_tape(device)) continue; if (opt_out_geom) do_geom(device, 1); diff --git a/getopt-1.1.0a/COPYING b/getopt-1.1.2/COPYING similarity index 100% rename from getopt-1.1.0a/COPYING rename to getopt-1.1.2/COPYING diff --git a/getopt-1.1.0a/Changelog b/getopt-1.1.2/Changelog similarity index 100% rename from getopt-1.1.0a/Changelog rename to getopt-1.1.2/Changelog diff --git a/getopt-1.1.0a/Makefile b/getopt-1.1.2/Makefile similarity index 100% rename from getopt-1.1.0a/Makefile rename to getopt-1.1.2/Makefile diff --git a/getopt-1.1.0a/README b/getopt-1.1.2/README similarity index 100% rename from getopt-1.1.0a/README rename to getopt-1.1.2/README diff --git a/getopt-1.1.0a/TODO b/getopt-1.1.2/TODO similarity index 100% rename from getopt-1.1.0a/TODO rename to getopt-1.1.2/TODO diff --git a/getopt-1.1.0a/getopt-1.0.6.lsm b/getopt-1.1.2/getopt-1.1.2.lsm similarity index 72% rename from getopt-1.1.0a/getopt-1.0.6.lsm rename to getopt-1.1.2/getopt-1.1.2.lsm index 6323916c..95be2591 100644 --- a/getopt-1.1.0a/getopt-1.0.6.lsm +++ b/getopt-1.1.2/getopt-1.1.2.lsm @@ -1,7 +1,7 @@ Begin3 Title: Getopt -Version: 1.0.6 -Entered-date: 27JUN00 +Version: 1.1.2 +Entered-date: 29MAR01 Description: An improved implementation of getopt(1), a program to parse options within a shell script. Fully compatible with other getopt(1) implementations, but with many additions like @@ -9,11 +9,11 @@ Description: An improved implementation of getopt(1), a program to parse Keywords: getopt script parse bash tcsh Author: frodol@dds.nl (Frodo Looijaard) Primary-site: http://huizen.dds.nl/~frodol - 28kB getopt-1.0.6.tar.gz - 600 getopt-1.0.6.lsm + 28kB getopt-1.1.2.tar.gz + 689 getopt-1.1.2.lsm Alternate-site: sunsite.unc.edu /pub/Linux/utils/shell - 28kB getopt-1.0.6.tar.gz - 600 getopt-1.0.6.lsm + 28kB getopt-1.1.2.tar.gz + 689 getopt-1.1.2.lsm Copying-policy: GPL End diff --git a/getopt-1.1.0a/getopt.1 b/getopt-1.1.2/getopt.1 similarity index 100% rename from getopt-1.1.0a/getopt.1 rename to getopt-1.1.2/getopt.1 diff --git a/getopt-1.1.0a/getopt.c b/getopt-1.1.2/getopt.c similarity index 99% rename from getopt-1.1.0a/getopt.c rename to getopt-1.1.2/getopt.c index e52c1490..95c3b34e 100644 --- a/getopt-1.1.0a/getopt.c +++ b/getopt-1.1.2/getopt.c @@ -438,7 +438,7 @@ int main(int argc, char *argv[]) quote=0; break; case 'V': - printf(_("getopt (enhanced) 1.1.0\n")); + printf(_("getopt (enhanced) 1.1.2\n")); exit(0); case '?': case ':': diff --git a/getopt-1.1.0a/gnu/getopt.c b/getopt-1.1.2/gnu/getopt.c similarity index 100% rename from getopt-1.1.0a/gnu/getopt.c rename to getopt-1.1.2/gnu/getopt.c diff --git a/getopt-1.1.0a/gnu/getopt.h b/getopt-1.1.2/gnu/getopt.h similarity index 100% rename from getopt-1.1.0a/gnu/getopt.h rename to getopt-1.1.2/gnu/getopt.h diff --git a/getopt-1.1.0a/gnu/getopt1.c b/getopt-1.1.2/gnu/getopt1.c similarity index 100% rename from getopt-1.1.0a/gnu/getopt1.c rename to getopt-1.1.2/gnu/getopt1.c diff --git a/getopt-1.1.0a/parse.bash b/getopt-1.1.2/parse.bash similarity index 100% rename from getopt-1.1.0a/parse.bash rename to getopt-1.1.2/parse.bash diff --git a/getopt-1.1.0a/parse.tcsh b/getopt-1.1.2/parse.tcsh similarity index 100% rename from getopt-1.1.0a/parse.tcsh rename to getopt-1.1.2/parse.tcsh diff --git a/getopt-1.1.0a/test.bash b/getopt-1.1.2/test.bash similarity index 100% rename from getopt-1.1.0a/test.bash rename to getopt-1.1.2/test.bash diff --git a/getopt-1.1.0a/test.tcsh b/getopt-1.1.2/test.tcsh similarity index 100% rename from getopt-1.1.0a/test.tcsh rename to getopt-1.1.2/test.tcsh diff --git a/hwclock/hwclock.8 b/hwclock/hwclock.8 index 07c4f8cd..d8cf5b03 100644 --- a/hwclock/hwclock.8 +++ b/hwclock/hwclock.8 @@ -20,7 +20,8 @@ hwclock \- query and set the hardware clock (RTC) .PP other options: .PP -.B "[\-u|\-\-utc] \-\-localtime \-\-directisa \-\-test \-\-debug" +.B "[\-u|\-\-utc] \-\-localtime \-\-noadjfile \-\-directisa" +.B "\-\-test [\-D|\-\-debug]" .PP and arcane options for DEC Alpha: .PP @@ -28,9 +29,7 @@ and arcane options for DEC Alpha: .PP Minimum unique abbreviations of all options are acceptable. .PP -Also, equivalent options \-r, \-w, \-s, \-a, \-v, \-u, -\-D, \-A, \-J, \-S, and \-F are accepted for compatibility -with the program "clock", while \-h asks for a help message. +Also, \-h asks for a help message. .SH DESCRIPTION .B hwclock @@ -171,6 +170,17 @@ or options), as recorded in the adjtime file. If the adjtime file doesn't exist, the default is local time. +.TP +.B \-\-noadjfile +disables the facilities provided by +.IR /etc/adjtime . +.B hwclock +will not read nor write to that file with this option. Either +.B \-\-utc +or +.B \-\-localtime +must be specified when using this option. + .TP .B \-\-directisa is meaningful only on an ISA machine or an Alpha (which implements enough diff --git a/hwclock/hwclock.c b/hwclock/hwclock.c index 3a3a94e1..ba6bc77c 100644 --- a/hwclock/hwclock.c +++ b/hwclock/hwclock.c @@ -259,6 +259,7 @@ read_adjtime(struct adjtime *adjtime_p, int *rc_p) { char line1[81]; /* String: first line of adjtime file */ char line2[81]; /* String: second line of adjtime file */ char line3[81]; /* String: third line of adjtime file */ + long timeval; line1[0] = '\0'; /* In case fgets fails */ fgets(line1, sizeof(line1), adjfile); @@ -274,13 +275,16 @@ read_adjtime(struct adjtime *adjtime_p, int *rc_p) { adjtime_p->last_adj_time = 0; adjtime_p->not_adjusted = 0; adjtime_p->last_calib_time = 0; + timeval = 0; - sscanf(line1, "%f %d %f", + sscanf(line1, "%f %ld %f", &adjtime_p->drift_factor, - (int *) &adjtime_p->last_adj_time, + &timeval, &adjtime_p->not_adjusted); - - sscanf(line2, "%d", (int *) &adjtime_p->last_calib_time); + adjtime_p->last_adj_time = timeval; + + sscanf(line2, "%ld", &timeval); + adjtime_p->last_calib_time = timeval; if (!strcmp(line3, "UTC\n")) adjtime_p->local_utc = UTC; @@ -300,10 +304,10 @@ read_adjtime(struct adjtime *adjtime_p, int *rc_p) { adjtime_p->dirty = FALSE; if (debug) { - printf(_("Last drift adjustment done at %d seconds after 1969\n"), - (int) adjtime_p->last_adj_time); - printf(_("Last calibration done at %d seconds after 1969\n"), - (int) adjtime_p->last_calib_time); + printf(_("Last drift adjustment done at %ld seconds after 1969\n"), + (long) adjtime_p->last_adj_time); + printf(_("Last calibration done at %ld seconds after 1969\n"), + (long) adjtime_p->last_calib_time); printf(_("Hardware clock is on %s time\n"), (adjtime_p->local_utc == LOCAL) ? _("local") : (adjtime_p->local_utc == UTC) ? _("UTC") : _("unknown")); @@ -447,9 +451,9 @@ set_hardware_clock(const time_t newtime, if (debug) printf(_("Setting Hardware Clock to %.2d:%.2d:%.2d " - "= %d seconds since 1969\n"), + "= %ld seconds since 1969\n"), new_broken_time.tm_hour, new_broken_time.tm_min, - new_broken_time.tm_sec, (int) newtime); + new_broken_time.tm_sec, (long) newtime); if (testing) printf(_("Clock not changed - testing only.\n")); @@ -597,8 +601,8 @@ interpret_date_string(const char *date_opt, time_t * const time_p) { MYNAME, date_command, date_resp); retcode = 8; } else { - int seconds_since_epoch; - rc = sscanf(date_resp + sizeof(magic)-1, "%d", &seconds_since_epoch); + long seconds_since_epoch; + rc = sscanf(date_resp + sizeof(magic)-1, "%ld", &seconds_since_epoch); if (rc < 1) { fprintf(stderr, _("The date command issued by %s returned " "something other than an integer where the converted " @@ -610,8 +614,8 @@ interpret_date_string(const char *date_opt, time_t * const time_p) { retcode = 0; *time_p = seconds_since_epoch; if (debug) - printf(_("date string %s equates to %d seconds since 1969.\n"), - date_opt, (int) *time_p); + printf(_("date string %s equates to %ld seconds since 1969.\n"), + date_opt, (long) *time_p); } } fclose(date_child_fp); @@ -719,7 +723,7 @@ adjust_drift_factor(struct adjtime *adjtime_p, if (debug) printf(_("Not adjusting drift factor because it has been less than a " "day since the last calibration.\n")); - } else { + } else if (adjtime_p->last_calib_time != 0) { const float factor_adjust = ((float) (nowtime - hclocktime) / (hclocktime - adjtime_p->last_calib_time)) @@ -931,7 +935,7 @@ determine_clock_access_method(const bool user_requests_ISA) { } static void -manipulate_clock(const bool show, const bool adjust, +manipulate_clock(const bool show, const bool adjust, const bool noadjfile, const bool set, const time_t set_time, const bool hctosys, const bool systohc, const struct timeval startup_time, @@ -953,7 +957,7 @@ manipulate_clock(const bool show, const bool adjust, if (no_auth) *retcode_p = 1; else { - if (adjust || set || systohc || (!utc && !local_opt)) + if (!noadjfile && (adjust || set || systohc || (!utc && !local_opt))) read_adjtime(&adjtime, &rc); else { /* A little trick to avoid reading the file if we don't have to */ @@ -1025,7 +1029,9 @@ manipulate_clock(const bool show, const bool adjust, *retcode_p = 1; } else *retcode_p = 0; } - save_adjtime(adjtime, testing); + if (!noadjfile) { + save_adjtime(adjtime, testing); + } } } } @@ -1121,6 +1127,8 @@ usage( const char *fmt, ... ) { " --date specifies the time to which to set the hardware clock\n" " --epoch=year specifies the year which is the beginning of the \n" " hardware clock's epoch value\n" + " --noadjfile do not access /etc/adjtime. Requires the use of\n" + " either --utc or --localtime\n" ),RTC_DEV); #ifdef __alpha__ fprintf( usageto, _( @@ -1160,7 +1168,7 @@ main(int argc, char **argv) { may be modified after parsing is complete to effect an implied option. */ bool help, show, set, systohc, hctosys, adjust, getepoch, setepoch, version; - bool ARCconsole, utc, testing, directisa, Jensen, SRM, funky_toy; + bool ARCconsole, utc, testing, directisa, Jensen, SRM, funky_toy, noadjfile; bool local_opt; char *date_opt; @@ -1173,6 +1181,7 @@ main(int argc, char **argv) { { 0, (char *) "getepoch", OPT_FLAG, &getepoch, 0 }, { 0, (char *) "setepoch", OPT_FLAG, &setepoch, 0 }, { 'a', (char *) "adjust", OPT_FLAG, &adjust, 0 }, + { 0, (char *) "noadjfile", OPT_FLAG, &noadjfile, 0 }, { 'v', (char *) "version", OPT_FLAG, &version, 0 }, { 'V', (char *) "version", OPT_FLAG, &version, 0 }, { 0, (char *) "date", OPT_STRING, &date_opt, 0 }, @@ -1185,8 +1194,11 @@ main(int argc, char **argv) { { 'D', (char *) "debug", OPT_FLAG, &debug, 0 }, #ifdef __alpha__ { 'A', (char *) "ARC", OPT_FLAG, &ARCconsole,0 }, + { 'A', (char *) "arc", OPT_FLAG, &ARCconsole,0 }, { 'J', (char *) "Jensen", OPT_FLAG, &Jensen, 0 }, + { 'J', (char *) "jensen", OPT_FLAG, &Jensen, 0 }, { 'S', (char *) "SRM", OPT_FLAG, &SRM, 0 }, + { 'S', (char *) "srm", OPT_FLAG, &SRM, 0 }, { 'F', (char *) "funky-toy", OPT_FLAG, &funky_toy, 0 }, #endif { 0, (char *) NULL, OPT_END, NULL, 0 } @@ -1207,17 +1219,18 @@ main(int argc, char **argv) { textdomain(PACKAGE); /* set option defaults */ - help = show = set = systohc = hctosys = adjust = getepoch = setepoch = - version = utc = local_opt = ARCconsole = SRM = funky_toy = - directisa = badyear = Jensen = testing = debug = FALSE; + help = show = set = systohc = hctosys = adjust = noadjfile = + getepoch = setepoch = version = utc = local_opt = + ARCconsole = SRM = funky_toy = directisa = badyear = Jensen = + testing = debug = FALSE; date_opt = NULL; argc_parse = argc; argv_parse = argv; optParseOptions(&argc_parse, argv_parse, option_def, 0); /* Uses and sets argc_parse, argv_parse. Sets show, systohc, hctosys, adjust, utc, local_opt, version, - testing, debug, set, date_opt, getepoch, setepoch, epoch_option - */ + testing, debug, set, date_opt, getepoch, setepoch, epoch_option, + noadjtime */ /* This is an ugly routine - for example, if I give an incorrect option, it only says "unrecognized option" without telling me what options are recognized. Rewrite with standard @@ -1245,6 +1258,18 @@ main(int argc, char **argv) { exit(100); } + if (adjust && noadjfile) { + fprintf(stderr, _("%s: The --adjust and --noadjfile options are mutually " + "exclusive. You specified both.\n"), MYNAME); + exit(100); + } + + if (noadjfile && !(utc || local_opt)) { + fprintf(stderr, _("%s: With --noadjfile, you must specify either " + "--utc or --localtime\n"), MYNAME); + exit(100); + } + #ifdef __alpha__ set_cmos_epoch(ARCconsole, SRM); set_cmos_access(Jensen, funky_toy); @@ -1302,8 +1327,9 @@ main(int argc, char **argv) { _("Use the --debug option to see the details of our " "search for an access method.\n")); } else - manipulate_clock(show, adjust, set, set_time, hctosys, systohc, - startup_time, utc, local_opt, testing, &rc); + manipulate_clock(show, adjust, noadjfile, set, set_time, + hctosys, systohc, startup_time, utc, local_opt, + testing, &rc); } } exit(retcode); diff --git a/hwclock/kd.c b/hwclock/kd.c index a2f313f6..f3327e1c 100644 --- a/hwclock/kd.c +++ b/hwclock/kd.c @@ -9,6 +9,7 @@ static int con_fd = -1; /* opened by probe_for_kd_clock() */ /* never closed */ +static char *con_fd_filename; /* usually "/dev/tty1" */ /* Get defines for KDGHWCLK and KDSHWCLK (m68k) */ #include @@ -88,7 +89,7 @@ read_hardware_clock_kd(struct tm *tm) { struct hwclk_time t; if (ioctl(con_fd, KDGHWCLK, &t) == -1) { - outsyserr(_("ioctl() failed to read time from /dev/tty1")); + outsyserr(_("ioctl() failed to read time from %s"), con_fd_filename); exit(5); } @@ -146,22 +147,29 @@ static struct clock_ops kd = { /* return &kd if KDGHWCLK works, NULL otherwise */ struct clock_ops * probe_for_kd_clock() { - struct clock_ops *ret = NULL; - struct hwclk_time t; - - if (con_fd < 0) - con_fd = open("/dev/tty1", O_RDONLY); - if (con_fd >= 0) { - if (ioctl( con_fd, KDGHWCLK, &t ) == -1) { - if (errno != EINVAL) - outsyserr(_("KDGHWCLK ioctl failed")); - } else - ret = &kd; - } else { - /* probably KDGHWCLK exists on m68k only */ + struct clock_ops *ret = NULL; + struct hwclk_time t; + + if (con_fd < 0) { /* first time here */ + con_fd_filename = "/dev/tty1"; + con_fd = open(con_fd_filename, O_RDONLY); + } + if (con_fd < 0) { + /* perhaps they are using devfs? */ + con_fd_filename = "/dev/vc/1"; + con_fd = open(con_fd_filename, O_RDONLY); + } + if (con_fd < 0) { + /* probably KDGHWCLK exists on m68k only */ #ifdef __m68k__ - outsyserr(_("Can't open /dev/tty1")); + outsyserr(_("Can't open /dev/tty1 or /dev/vc/1")); #endif - } - return ret; + } else { + if (ioctl(con_fd, KDGHWCLK, &t) == -1) { + if (errno != EINVAL) + outsyserr(_("KDGHWCLK ioctl failed")); + } else + ret = &kd; + } + return ret; } diff --git a/hwclock/rtc.c b/hwclock/rtc.c index 06ac4360..2694d866 100644 --- a/hwclock/rtc.c +++ b/hwclock/rtc.c @@ -18,13 +18,6 @@ * used a struct rtc_time different from that used in mc146818rtc.h. */ -/* ia64 uses /dev/efirtc (char 10,136) */ -#if __ia64__ -#define RTC_DEV "/dev/efirtc" -#else -#define RTC_DEV "/dev/rtc" -#endif - /* On Sparcs, there is a that defines different ioctls (that are required on my machine). However, this include file does not exist on other architectures. */ @@ -87,38 +80,67 @@ struct linux_rtc_time { #endif +/* ia64 uses /dev/efirtc (char 10,136) */ +/* devfs uses /dev/misc/rtc */ +#if __ia64__ +#define RTC_DEVN "efirtc" +#else +#define RTC_DEVN "rtc" +#endif + +static char rtc_dev_name[40]; + +/* maybe we should not try /dev/misc/efirtc? + maybe we should reset rtc_dev_name to give better error messages */ +static int +open_rtc(void) { + int rtc_fd; + + sprintf(rtc_dev_name, "/dev/%s", RTC_DEVN); + rtc_fd = open(rtc_dev_name, O_RDONLY); + if (rtc_fd < 0) { + sprintf(rtc_dev_name, "/dev/misc/%s", RTC_DEVN); + rtc_fd = open(rtc_dev_name, O_RDONLY); + } + return rtc_fd; +} + static int do_rtc_read_ioctl(int rtc_fd, struct tm *tm) { - int rc; - char *ioctlname; -#ifdef __sparc__ - struct sparc_rtc_time stm; + int rc = -1; + char *ioctlname; - ioctlname = "RTCGET"; - rc = ioctl(rtc_fd, RTCGET, &stm); -#else - ioctlname = "RTC_RD_TIME"; - rc = ioctl(rtc_fd, RTC_RD_TIME, tm); -#endif - if (rc == -1) { - perror(ioctlname); - fprintf(stderr, _("ioctl() to %s to read the time failed.\n"),RTC_DEV); - exit(5); - } #ifdef __sparc__ - tm->tm_sec = stm.sec; - tm->tm_min = stm.min; - tm->tm_hour = stm.hour; - tm->tm_mday = stm.dom; - tm->tm_mon = stm.month - 1; - tm->tm_year = stm.year - 1900; - tm->tm_wday = stm.dow - 1; - tm->tm_yday = -1; /* day in the year */ + /* some but not all sparcs use a different ioctl and struct */ + struct sparc_rtc_time stm; + + ioctlname = "RTCGET"; + rc = ioctl(rtc_fd, RTCGET, &stm); + if (rc == 0) { + tm->tm_sec = stm.sec; + tm->tm_min = stm.min; + tm->tm_hour = stm.hour; + tm->tm_mday = stm.dom; + tm->tm_mon = stm.month - 1; + tm->tm_year = stm.year - 1900; + tm->tm_wday = stm.dow - 1; + tm->tm_yday = -1; /* day in the year */ + } #endif - tm->tm_isdst = -1; /* don't know whether it's daylight */ - return 0; -} - + if (rc == -1) { /* no sparc, or RTCGET failed */ + ioctlname = "RTC_RD_TIME"; + rc = ioctl(rtc_fd, RTC_RD_TIME, tm); + } + if (rc == -1) { + perror(ioctlname); + fprintf(stderr, _("ioctl() to %s to read the time failed.\n"), + rtc_dev_name); + exit(5); + } + + tm->tm_isdst = -1; /* don't know whether it's dst */ + return 0; +} static int busywait_for_rtc_clock_tick(const int rtc_fd) { @@ -133,7 +155,8 @@ busywait_for_rtc_clock_tick(const int rtc_fd) { int rc; if (debug) - printf(_("Waiting in loop for time from %s to change\n"),RTC_DEV); + printf(_("Waiting in loop for time from %s to change\n"), + rtc_dev_name); rc = do_rtc_read_ioctl(rtc_fd, &start_time); if (rc) @@ -167,9 +190,9 @@ synchronize_to_clock_tick_rtc(void) { int rtc_fd; /* File descriptor of /dev/rtc */ int ret; - rtc_fd = open(RTC_DEV,O_RDONLY); + rtc_fd = open(rtc_dev_name, O_RDONLY); if (rtc_fd == -1) { - outsyserr(_("open() of %s failed"),RTC_DEV); + outsyserr(_("open() of %s failed"), rtc_dev_name); ret = 1; } else { int rc; /* Return code from ioctl */ @@ -187,7 +210,8 @@ int ret; kernel for the system clock, so aren't at the user's disposal. */ if (debug) - printf(_("%s does not have interrupt functions. "),RTC_DEV); + printf(_("%s does not have interrupt functions. "), + rtc_dev_name); ret = busywait_for_rtc_clock_tick(rtc_fd); } else if (rc == 0) { unsigned long dummy; @@ -195,7 +219,8 @@ int ret; /* this blocks until the next update interrupt */ rc = read(rtc_fd, &dummy, sizeof(dummy)); if (rc == -1) { - outsyserr(_("read() to %s to wait for clock tick failed"),RTC_DEV); + outsyserr(_("read() to %s to wait for clock tick failed"), + rtc_dev_name); ret = 1; } else { ret = 0; @@ -203,11 +228,11 @@ int ret; /* Turn off update interrupts */ rc = ioctl(rtc_fd, RTC_UIE_OFF, 0); if (rc == -1) - outsyserr(_("ioctl() to %s to turn off update interrupts " - "failed"),RTC_DEV); + outsyserr(_("ioctl() to %s to turn off update interrupts failed"), + rtc_dev_name); } else { outsyserr(_("ioctl() to %s to turn on update interrupts " - "failed unexpectedly"),RTC_DEV); + "failed unexpectedly"), rtc_dev_name); ret = 1; } close(rtc_fd); @@ -218,69 +243,70 @@ int ret; static int read_hardware_clock_rtc(struct tm *tm) { -/*---------------------------------------------------------------------------- - Read the hardware clock and return the current time via - argument. Use ioctls to "rtc" device /dev/rtc. ------------------------------------------------------------------------------*/ - int rtc_fd; /* File descriptor of /dev/rtc */ + int rtc_fd; - rtc_fd = open(RTC_DEV,O_RDONLY); - if (rtc_fd == -1) { - outsyserr(_("open() of %s failed"),RTC_DEV); - exit(5); - } + rtc_fd = open_rtc(); + if (rtc_fd == -1) { + outsyserr(_("open() of %s failed"), rtc_dev_name); + exit(5); + } - /* Read the RTC time/date */ - do_rtc_read_ioctl(rtc_fd, tm); + /* Read the RTC time/date, return answer via tm */ + do_rtc_read_ioctl(rtc_fd, tm); - close(rtc_fd); - return 0; + close(rtc_fd); + return 0; } static int set_hardware_clock_rtc(const struct tm *new_broken_time) { -/*---------------------------------------------------------------------------- +/*------------------------------------------------------------------------- Set the Hardware Clock to the broken down time . Use ioctls to "rtc" device /dev/rtc. -----------------------------------------------------------------------------*/ - int rc; - int rtc_fd; - - rtc_fd = open(RTC_DEV, O_RDONLY); - if (rtc_fd < 0) { - outsyserr(_("Unable to open %s"),RTC_DEV); - exit(5); - } else { - char *ioctlname; + -------------------------------------------------------------------------*/ + int rc = -1; + int rtc_fd; + char *ioctlname; + + rtc_fd = open_rtc(); + if (rtc_fd < 0) { + outsyserr(_("Unable to open %s"), rtc_dev_name); + exit(5); + } #ifdef __sparc__ - struct sparc_rtc_time stm; - - stm.sec = new_broken_time->tm_sec; - stm.min = new_broken_time->tm_min; - stm.hour = new_broken_time->tm_hour; - stm.dom = new_broken_time->tm_mday; - stm.month = new_broken_time->tm_mon + 1; - stm.year = new_broken_time->tm_year + 1900; - stm.dow = new_broken_time->tm_wday + 1; - - ioctlname = "RTCSET"; - rc = ioctl(rtc_fd, RTCSET, &stm); -#else - ioctlname = "RTC_SET_TIME"; - rc = ioctl(rtc_fd, RTC_SET_TIME, new_broken_time); + { + struct sparc_rtc_time stm; + + stm.sec = new_broken_time->tm_sec; + stm.min = new_broken_time->tm_min; + stm.hour = new_broken_time->tm_hour; + stm.dom = new_broken_time->tm_mday; + stm.month = new_broken_time->tm_mon + 1; + stm.year = new_broken_time->tm_year + 1900; + stm.dow = new_broken_time->tm_wday + 1; + + ioctlname = "RTCSET"; + rc = ioctl(rtc_fd, RTCSET, &stm); + } #endif - if (rc == -1) { - perror(ioctlname); - fprintf(stderr, _("ioctl() to %s to set the time failed.\n"),RTC_DEV); - exit(5); - } else { - if (debug) - printf(_("ioctl(%s) was successful.\n"), ioctlname); - } - close(rtc_fd); - } - return 0; + if (rc == -1) { /* no sparc, or RTCSET failed */ + ioctlname = "RTC_SET_TIME"; + rc = ioctl(rtc_fd, RTC_SET_TIME, new_broken_time); + } + + if (rc == -1) { + perror(ioctlname); + fprintf(stderr, _("ioctl() to %s to set the time failed.\n"), + rtc_dev_name); + exit(5); + } + + if (debug) + printf(_("ioctl(%s) was successful.\n"), ioctlname); + + close(rtc_fd); + return 0; } @@ -290,7 +316,7 @@ get_permissions_rtc(void) { } static struct clock_ops rtc = { - RTC_DEV " interface to clock", + "/dev/" RTC_DEVN " interface to clock", get_permissions_rtc, read_hardware_clock_rtc, set_hardware_clock_rtc, @@ -300,14 +326,14 @@ static struct clock_ops rtc = { /* return &rtc if /dev/rtc can be opened, NULL otherwise */ struct clock_ops * probe_for_rtc_clock(){ - int rtc_fd = open(RTC_DEV, O_RDONLY); - if (rtc_fd > 0) { - close(rtc_fd); - return &rtc; - } - if (debug) - outsyserr(_("Open of %s failed"),RTC_DEV); - return NULL; + int rtc_fd = open_rtc(); + if (rtc_fd > 0) { + close(rtc_fd); + return &rtc; + } + if (debug) + outsyserr(_("Open of %s failed"), rtc_dev_name); + return NULL; } @@ -319,30 +345,31 @@ get_epoch_rtc(unsigned long *epoch_p, int silent) { ----------------------------------------------------------------------------*/ int rtc_fd; - rtc_fd = open(RTC_DEV, O_RDONLY); + rtc_fd = open_rtc(); if (rtc_fd < 0) { if (!silent) { if (errno == ENOENT) fprintf(stderr, _( "To manipulate the epoch value in the kernel, we must " "access the Linux 'rtc' device driver via the device special " - "file %s. This file does not exist on this system.\n"),RTC_DEV); + "file %s. This file does not exist on this system.\n"), + rtc_dev_name); else - outsyserr(_("Unable to open %s"),RTC_DEV); + outsyserr(_("Unable to open %s"), rtc_dev_name); } return 1; } if (ioctl(rtc_fd, RTC_EPOCH_READ, epoch_p) == -1) { if (!silent) - outsyserr(_("ioctl(RTC_EPOCH_READ) to %s failed"),RTC_DEV); + outsyserr(_("ioctl(RTC_EPOCH_READ) to %s failed"), rtc_dev_name); close(rtc_fd); return 1; } if (debug) printf(_("we have read epoch %ld from %s " - "with RTC_EPOCH_READ ioctl.\n"), *epoch_p,RTC_DEV); + "with RTC_EPOCH_READ ioctl.\n"), *epoch_p, rtc_dev_name); close(rtc_fd); return 0; @@ -366,27 +393,28 @@ set_epoch_rtc(unsigned long epoch) { return 1; } - rtc_fd = open(RTC_DEV, O_RDONLY); + rtc_fd = open_rtc(); if (rtc_fd < 0) { if (errno == ENOENT) fprintf(stderr, _("To manipulate the epoch value in the kernel, we must " "access the Linux 'rtc' device driver via the device special " - "file %s. This file does not exist on this system.\n"),RTC_DEV); + "file %s. This file does not exist on this system.\n"), + rtc_dev_name); else - outsyserr(_("Unable to open %s"),RTC_DEV); + outsyserr(_("Unable to open %s"), rtc_dev_name); return 1; } if (debug) printf(_("setting epoch to %ld " - "with RTC_EPOCH_SET ioctl to %s.\n"), epoch, RTC_DEV); + "with RTC_EPOCH_SET ioctl to %s.\n"), epoch, rtc_dev_name); if (ioctl(rtc_fd, RTC_EPOCH_SET, epoch) == -1) { if (errno == EINVAL) fprintf(stderr, _("The kernel device driver for %s " - "does not have the RTC_EPOCH_SET ioctl.\n"),RTC_DEV); + "does not have the RTC_EPOCH_SET ioctl.\n"), rtc_dev_name); else - outsyserr(_("ioctl(RTC_EPOCH_SET) to %s failed"),RTC_DEV); + outsyserr(_("ioctl(RTC_EPOCH_SET) to %s failed"), rtc_dev_name); close(rtc_fd); return 1; } diff --git a/lib/pathnames.h b/lib/pathnames.h index 9f10a16d..33886a5c 100644 --- a/lib/pathnames.h +++ b/lib/pathnames.h @@ -148,5 +148,5 @@ Libc5 and glibc 2.0-2.1 have /var/spool/mail, but glibc 2.1.1 has /var/mail. #define _PATH_SHADOW_GTMPTMP "/etc/sgtmptmp" /* used in misc-utils/look.c */ -#define _PATH_WORDS "/usr/dict/words" -#define _PATH_WORDS_ALT "/usr/dict/web2" +#define _PATH_WORDS "/usr/share/dict/words" +#define _PATH_WORDS_ALT "/usr/share/dict/web2" diff --git a/login-utils/Makefile b/login-utils/Makefile index e6b37b8a..dc96f878 100644 --- a/login-utils/Makefile +++ b/login-utils/Makefile @@ -83,7 +83,7 @@ all-getty: $(SBIN.GETTY) all-misc: $(USRBIN.MISC) # Rules for everything else - +login.o: ../MCONFIG checktty.o login.o: login.h cryptocard.o login.o: cryptocard.h chfn.o chsh.o islocal.o passwd.o: islocal.h diff --git a/login-utils/agetty.c b/login-utils/agetty.c index 3a30b16b..c7f0f3d2 100644 --- a/login-utils/agetty.c +++ b/login-utils/agetty.c @@ -683,8 +683,12 @@ open_tty(tty, tp, local) * access for group tty) after the login has succeeded. */ + /* + * Let us use 0600 for Linux for the period between getty and login + */ + (void) chown(tty, 0, 0); /* root, sys */ - (void) chmod(tty, 0622); /* crw--w--w- */ + (void) chmod(tty, 0600); /* 0622: crw--w--w- */ errno = 0; /* ignore above errors */ } diff --git a/login-utils/checktty.c b/login-utils/checktty.c index e96647ea..8171f44d 100644 --- a/login-utils/checktty.c +++ b/login-utils/checktty.c @@ -33,7 +33,7 @@ #include "xstrncpy.h" #ifdef TESTING -struct hostent hostaddress; +char hostaddress[4]; char *hostname; void @@ -192,10 +192,10 @@ hnmatch(const char *hn, const char *pat) mask = (((unsigned long)y1<<24)+((unsigned long)y2<<16) +((unsigned long)y3<<8)+((unsigned long)y4)); - if (!hostaddress.h_addr_list || !hostaddress.h_addr_list[0]) - return 0; + if (hostaddress[0] == 0) + return 0; - ha = (unsigned char *)hostaddress.h_addr_list[0]; + ha = (unsigned char *)hostaddress; a = (((unsigned long)ha[0]<<24)+((unsigned long)ha[1]<<16) +((unsigned long)ha[2]<<8)+((unsigned long)ha[3])); return ((p & mask) == (a & mask)); diff --git a/login-utils/chsh.c b/login-utils/chsh.c index fd9b5899..4be7e555 100644 --- a/login-utils/chsh.c +++ b/login-utils/chsh.c @@ -201,11 +201,8 @@ main (int argc, char *argv[]) { * parse the command line arguments, and fill in "pinfo" with any * information from the command line. */ -static void parse_argv (argc, argv, pinfo) - int argc; - char *argv[]; - struct sinfo *pinfo; -{ +static void +parse_argv (int argc, char *argv[], struct sinfo *pinfo) { int index, c; static struct option long_options[] = { @@ -257,22 +254,20 @@ static void parse_argv (argc, argv, pinfo) * usage () -- * print out a usage message. */ -static void usage (fp) - FILE *fp; -{ - fprintf (fp, _("Usage: %s [ -s shell ] "), whoami); - fprintf (fp, _("[ --list-shells ] [ --help ] [ --version ]\n")); - fprintf (fp, _(" [ username ]\n")); +static void +usage (FILE *fp) { + fprintf (fp, + _("Usage: %s [ -s shell ] [ --list-shells ] " + "[ --help ] [ --version ]\n" + " [ username ]\n"), whoami); } /* * prompt () -- * ask the user for a given field and return it. */ -static char *prompt (question, def_val) - char *question; - char *def_val; -{ +static char * +prompt (char *question, char *def_val) { int len; char *ans, *cp; @@ -300,9 +295,8 @@ static char *prompt (question, def_val) * an error and return (-1). * if the shell is a bad idea, print a warning. */ -static int check_shell (shell) - char *shell; -{ +static int +check_shell (char *shell) { int i, c; if (*shell != '/') { @@ -354,9 +348,8 @@ static int check_shell (shell) * return true. if not, return false. * if the given shell is NULL, /etc/shells is outputted to stdout. */ -static boolean get_shell_list (shell_name) - char *shell_name; -{ +static boolean +get_shell_list (char *shell_name) { FILE *fp; boolean found; int len; @@ -391,9 +384,8 @@ static boolean get_shell_list (shell_name) /* * xmalloc () -- malloc that never fails. */ -static void *xmalloc (bytes) - int bytes; -{ +static void * +xmalloc (int bytes) { void *vp; vp = malloc (bytes); diff --git a/login-utils/initctl.8 b/login-utils/initctl.8 index 1aa421a0..2fade3f5 100644 --- a/login-utils/initctl.8 +++ b/login-utils/initctl.8 @@ -1,4 +1,4 @@ -.\" Copyright (C) 2000 Richard Gooch +.\" Copyright (C) 2000-2001 Richard Gooch .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by @@ -18,9 +18,9 @@ .\" The postal address is: .\" Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia. .\" -.\" initctl.8 Richard Gooch 6-NOV-2000 +.\" initctl.8 Richard Gooch 21-FEB-2001 .\" -.TH INITCTL 8 "6 Nov 2000" "Util-Linux Package" +.TH INITCTL 8 "21 Feb 2001" "Util-Linux Package" .SH NAME initctl \- utility to control simpleinit(8) .SH SYNOPSIS @@ -30,12 +30,12 @@ initctl \- utility to control simpleinit(8) \fBprovide service\fP .fi .SH OVERVIEW -The \fBneed\fP programme is designed to help improve the robustness, -scalability and readability of system boot scripts. It is now possible -to write a modularised set of boot scripts without the complex and -fragile numbered symlink scheme used in SysV-style boot scripts. Each -script can simply declare, using \fBneed\fP(8), what must run before -them. +The \fBinitctl\fP programme is designed to help improve the +robustness, scalability and readability of system boot scripts. It is +now possible to write a modularised set of boot scripts without the +complex and fragile numbered symlink scheme used in SysV-style boot +scripts. Each script can simply declare, using \fBneed\fP(8), what +must run before them. .SH DESCRIPTION for need The \fBneed\fP programme is a utility that tells \fBsimpleinit\fP(8) to start a \fIservice\fP (usually a script in \fI/sbin/init.d\fP) and @@ -83,15 +83,15 @@ The exit code from \fBprovide\fP is 0 if the service may be provided, init. It may block waiting for another provider which is initialising the service. .SH SIGNALS -\fBneed\fP(8) uses \fBSIGUSR1\fP, \fBSIGUSR2\fP and \fBSIGPOLL\fP for -communication with \fBsimpleinit\fP(8). Don't send these signals to -it. +\fBinitctl\fP(8) uses \fBSIGUSR1\fP, \fBSIGUSR2\fP and \fBSIGPOLL\fP +for communication with \fBsimpleinit\fP(8). Don't send these signals +to it. .SH FILES .PD 0 .TP 20 .BI /dev/initctl This is the control FIFO, created by \fBsimpleinit\fP(8), which -\fBneed\fP(8) writes commands to. +\fBinitctl\fP(8) writes commands to. .SH SEE ALSO .BR simpleinit (8), .BR init (8) diff --git a/login-utils/login.c b/login-utils/login.c index 1cf188fb..40950739 100644 --- a/login-utils/login.c +++ b/login-utils/login.c @@ -13,11 +13,7 @@ - The program uses BSD command line options to be used in connection with e.g. 'rlogind' i.e. 'new login'. - - HP features left out: logging of bad login attempts in /etc/btmp, - they are sent to syslog - - password expiry - + - HP features left out: password expiry '*' as login shell, add it if you need it - BSD features left out: quota checks @@ -168,23 +164,6 @@ #include "setproctitle.h" #endif -/* - * RedHat writes: - * we've got a REAL HACK to avoid telling people that they have - * mail because the imap server has left a turd in their inbox. - * It works, but it sucks... - * It turns out that the turd is always 523 bytes long, so we - * just check for that size. - */ -/* - * If you want to turn this strange hack off, set - #define REDHAT_IGNORED_MAILSIZE 0 - * In case people complain, this may become a configuration option, - * or perhaps this hack is thrown out again. - * A better solution would be to check the contents of this file.. - */ -#define REDHAT_IGNORED_MAILSIZE 523 - #if 0 /* from before we had a lastlog.h file in linux */ struct lastlog @@ -243,24 +222,26 @@ int timeout = 60; /* used in cryptocard.c */ #endif struct passwd *pwd; /* used in cryptocard.c */ -struct hostent hostaddress; /* used in checktty.c */ -char term[64], *hostname, *username, *tty; +char hostaddress[4]; /* used in checktty.c */ +char *hostname; /* idem */ +static char *username, *tty_name, *tty_number; static char thishost[100]; static int failures = 1; #ifndef __linux__ struct sgttyb sgttyb; struct tchars tc = { - CINTR, CQUIT, CSTART, CSTOP, CEOT, CBRK - }; + CINTR, CQUIT, CSTART, CSTOP, CEOT, CBRK +}; struct ltchars ltc = { - CSUSP, CDSUSP, CRPRNT, CFLUSH, CWERASE, CLNEXT - }; + CSUSP, CDSUSP, CRPRNT, CFLUSH, CWERASE, CLNEXT +}; #endif -const char *months[] = -{ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", - "Sep", "Oct", "Nov", "Dec" }; +const char *months[] = { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" +}; /* Nice and simple code provided by Linus Torvalds 16-Feb-93 */ /* Nonblocking stuff by Maciej W. Rozycki, macro@ds2.pg.gda.pl, 1999. @@ -271,8 +252,7 @@ const char *months[] = leaving the decision to make a connection to getty (where it actually belongs). */ static void -opentty(const char * tty) -{ +opentty(const char * tty) { int i; int fd = open(tty, O_RDWR | O_NONBLOCK); int flags = fcntl(fd, F_GETFL); @@ -290,8 +270,7 @@ opentty(const char * tty) /* true if the filedescriptor fd is a console tty, very Linux specific */ static int -consoletty(int fd) -{ +consoletty(int fd) { #ifdef __linux__ struct stat stb; @@ -304,6 +283,47 @@ consoletty(int fd) return 0; } +#if USE_PAM +/* + * Log failed login attempts in _PATH_BTMP if that exists. + * Must be called only with username the name of an actual user. + * The most common login failure is to give password instead of username. + */ +#define _PATH_BTMP "/var/log/btmp" +static void +logbtmp(const char *line, const char *username, const char *hostname) { + struct utmp ut; + + memset(&ut, 0, sizeof(ut)); + + strncpy(ut.ut_user, username ? username : "(unknown)", + sizeof(ut.ut_user)); + + strncpy(ut.ut_id, line + 3, sizeof(ut.ut_id)); + xstrncpy(ut.ut_line, line, sizeof(ut.ut_line)); + +#if defined(_HAVE_UT_TV) /* in included by */ + gettimeofday(&ut.ut_tv, NULL); +#else + { + time_t t; + time(&t); + ut.ut_time = t; /* ut_time is not always a time_t */ + } +#endif + + ut.ut_type = LOGIN_PROCESS; /* XXX doesn't matter */ + ut.ut_pid = getpid(); + if (hostname) { + xstrncpy(ut.ut_host, hostname, sizeof(ut.ut_host)); + if (hostaddress[0]) + memcpy(&ut.ut_addr, hostaddress, sizeof(ut.ut_addr)); + } +#ifdef HAVE_updwtmp /* bad luck for ancient systems */ + updwtmp(_PATH_BTMP, &ut); +#endif +} +#endif /* USE_PAM */ int main(int argc, char **argv) @@ -363,7 +383,7 @@ main(int argc, char **argv) xstrncpy(thishost, tbuf, sizeof(thishost)); domain = index(tbuf, '.'); - username = tty = hostname = NULL; + username = tty_name = hostname = NULL; fflag = hflag = pflag = 0; passwd_req = 1; @@ -383,14 +403,16 @@ main(int argc, char **argv) if (domain && (p = index(optarg, '.')) && strcasecmp(p, domain) == 0) *p = 0; + hostname = strdup(optarg); /* strdup: Ambrose C. Li */ - { - struct hostent *he = gethostbyname(hostname); - if (he) { - memcpy(&hostaddress, he, sizeof(hostaddress)); - } else { - memset(&hostaddress, 0, sizeof(hostaddress)); - } + { + struct hostent *he = gethostbyname(hostname); + + /* he points to static storage; copy the part we use */ + hostaddress[0] = 0; + if (he && he->h_addr_list && he->h_addr_list[0]) + memcpy(hostaddress, he->h_addr_list[0], + sizeof(hostaddress)); } break; @@ -430,8 +452,7 @@ main(int argc, char **argv) ioctl(0, TIOCSETP, &sgttyb); /* - * Be sure that we're in - * blocking mode!!! + * Be sure that we're in blocking mode!!! * This is really for HPUX */ ioctlval = 0; @@ -448,16 +469,23 @@ main(int argc, char **argv) ttyn = tname; } -#ifdef CHOWNVCS - /* find names of Virtual Console devices, for later mode change */ - { + if (strncmp(ttyn, "/dev/", 5) == 0) + tty_name = ttyn+5; + else + tty_name = ttyn; + + if (strncmp(ttyn, "/dev/tty", 8) == 0) + tty_number = ttyn+8; + else { char *p = ttyn; - /* find number of tty */ while (*p && !isdigit(*p)) p++; - - strcpy(vcsn, "/dev/vcs"); strcat(vcsn, p); - strcpy(vcsan, "/dev/vcsa"); strcat(vcsan, p); + tty_number = p; } + +#ifdef CHOWNVCS + /* find names of Virtual Console devices, for later mode change */ + snprintf(vcsn, sizeof(vcsn), "/dev/vcs%s", tty_number); + snprintf(vcsan, sizeof(vcsan), "/dev/vcsa%s", tty_number); #endif setpgrp(); @@ -469,12 +497,15 @@ main(int argc, char **argv) ttt = tt; ttt.c_cflag &= ~HUPCL; - if((chown(ttyn, 0, 0) == 0) && (chmod(ttyn, TTY_MODE) == 0)) { - tcsetattr(0,TCSAFLUSH,&ttt); - signal(SIGHUP, SIG_IGN); /* so vhangup() wont kill us */ - vhangup(); - signal(SIGHUP, SIG_DFL); - } + /* These can fail, e.g. with ttyn on a read-only filesystem */ + chown(ttyn, 0, 0); + chmod(ttyn, TTY_MODE); + + /* Kill processes left on this tty */ + tcsetattr(0,TCSAFLUSH,&ttt); + signal(SIGHUP, SIG_IGN); /* so vhangup() wont kill us */ + vhangup(); + signal(SIGHUP, SIG_DFL); setsid(); @@ -484,11 +515,6 @@ main(int argc, char **argv) tcsetattr(0,TCSAFLUSH,&tt); } - if (strncmp(ttyn, "/dev/", 5) == 0) - tty = ttyn+5; - else - tty = ttyn; - openlog("login", LOG_ODELAY, LOG_AUTHPRIV); #if 0 @@ -515,7 +541,7 @@ main(int argc, char **argv) depending on how much we know */ retcode = pam_set_item(pamh, PAM_RHOST, hostname); PAM_FAIL_CHECK; - retcode = pam_set_item(pamh, PAM_TTY, tty); + retcode = pam_set_item(pamh, PAM_TTY, tty_name); PAM_FAIL_CHECK; /* @@ -545,6 +571,11 @@ main(int argc, char **argv) if(passwd_req == 1) { int failcount=0; + /* if we didn't get a user on the command line, set it to NULL */ + pam_get_item(pamh, PAM_USER, (const void **) &username); + if (!username) + pam_set_item(pamh, PAM_USER, NULL); + /* there may be better ways to deal with some of these conditions, but at least this way I don't think we'll be giving away information... */ @@ -558,8 +589,11 @@ main(int argc, char **argv) (retcode == PAM_CRED_INSUFFICIENT) || (retcode == PAM_AUTHINFO_UNAVAIL))) { pam_get_item(pamh, PAM_USER, (const void **) &username); + syslog(LOG_NOTICE,_("FAILED LOGIN %d FROM %s FOR %s, %s"), - failcount, hostname, username, pam_strerror(pamh, retcode)); + failcount, hostname, username, pam_strerror(pamh, retcode)); + logbtmp(tty_name, username, hostname); + fprintf(stderr,_("Login incorrect\n\n")); pam_set_item(pamh,PAM_USER,NULL); retcode = pam_authenticate(pamh, 0); @@ -568,13 +602,14 @@ main(int argc, char **argv) if (retcode != PAM_SUCCESS) { pam_get_item(pamh, PAM_USER, (const void **) &username); - if (retcode == PAM_MAXTRIES) + if (retcode == PAM_MAXTRIES) syslog(LOG_NOTICE,_("TOO MANY LOGIN TRIES (%d) FROM %s FOR " "%s, %s"), failcount, hostname, username, pam_strerror(pamh, retcode)); else syslog(LOG_NOTICE,_("FAILED LOGIN SESSION FROM %s FOR %s, %s"), hostname, username, pam_strerror(pamh, retcode)); + logbtmp(tty_name, username, hostname); fprintf(stderr,_("\nLogin incorrect\n")); pam_end(pamh, retcode); @@ -651,7 +686,7 @@ main(int argc, char **argv) if (pwd) { initgroups(username, pwd->pw_gid); - checktty(username, tty, pwd); /* in checktty.c */ + checktty(username, tty_name, pwd); /* in checktty.c */ } /* if user not super-user, check for disabled logins */ @@ -673,7 +708,7 @@ main(int argc, char **argv) * If trying to log in as root, but with insecure terminal, * refuse the login attempt. */ - if (pwd && pwd->pw_uid == 0 && !rootterm(tty)) { + if (pwd && pwd->pw_uid == 0 && !rootterm(tty_name)) { fprintf(stderr, _("%s login refused on this terminal.\n"), pwd->pw_name); @@ -681,11 +716,11 @@ main(int argc, char **argv) if (hostname) syslog(LOG_NOTICE, _("LOGIN %s REFUSED FROM %s ON TTY %s"), - pwd->pw_name, hostname, tty); + pwd->pw_name, hostname, tty_name); else syslog(LOG_NOTICE, _("LOGIN %s REFUSED ON TTY %s"), - pwd->pw_name, tty); + pwd->pw_name, tty_name); continue; } @@ -833,8 +868,8 @@ Michael Riepe if (utp == NULL) { setutent(); ut.ut_type = LOGIN_PROCESS; - strncpy(ut.ut_id, ttyn + 8, sizeof(ut.ut_id)); - strncpy(ut.ut_line, ttyn + 5, sizeof(ut.ut_line)); + strncpy(ut.ut_id, tty_number, sizeof(ut.ut_id)); + strncpy(ut.ut_line, tty_name, sizeof(ut.ut_line)); utp = getutid(&ut); } @@ -846,27 +881,26 @@ Michael Riepe } if (ut.ut_id[0] == 0) - strncpy(ut.ut_id, ttyn + 8, sizeof(ut.ut_id)); + strncpy(ut.ut_id, tty_number, sizeof(ut.ut_id)); strncpy(ut.ut_user, username, sizeof(ut.ut_user)); - xstrncpy(ut.ut_line, ttyn + 5, sizeof(ut.ut_line)); + xstrncpy(ut.ut_line, tty_name, sizeof(ut.ut_line)); #ifdef _HAVE_UT_TV /* in included by */ gettimeofday(&ut.ut_tv, NULL); #else { - time_t t; - time(&t); - ut.ut_time = t; /* ut_time is not always a time_t */ + time_t t; + time(&t); + ut.ut_time = t; /* ut_time is not always a time_t */ /* glibc2 #defines it as ut_tv.tv_sec */ } #endif ut.ut_type = USER_PROCESS; ut.ut_pid = mypid; if (hostname) { - xstrncpy(ut.ut_host, hostname, sizeof(ut.ut_host)); - if (hostaddress.h_addr_list) - memcpy(&ut.ut_addr, hostaddress.h_addr_list[0], - sizeof(ut.ut_addr)); + xstrncpy(ut.ut_host, hostname, sizeof(ut.ut_host)); + if (hostaddress[0]) + memcpy(&ut.ut_addr, hostaddress, sizeof(ut.ut_addr)); } pututline(&ut); @@ -980,14 +1014,12 @@ Michael Riepe #ifdef USE_PAM { int i; - const char * const * env; - - env = (const char * const *)pam_getenvlist(pamh); + char ** env = pam_getenvlist(pamh); if (env != NULL) { - for (i=0; env[i++]; ) { - putenv(env[i-1]); - /* D(("env[%d] = %s", i-1,env[i-1])); */ + for (i=0; env[i]; i++) { + putenv(env[i]); + /* D(("env[%d] = %s", i,env[i])); */ } } } @@ -997,8 +1029,8 @@ Michael Riepe setproctitle("login", username); #endif - if (tty[sizeof("tty")-1] == 'S') - syslog(LOG_INFO, _("DIALUP AT %s BY %s"), tty, pwd->pw_name); + if (!strncmp(tty_name, "ttyS", 4)) + syslog(LOG_INFO, _("DIALUP AT %s BY %s"), tty_name, pwd->pw_name); /* allow tracking of good logins. -steve philp (sphilp@mail.alliance.net) */ @@ -1006,15 +1038,15 @@ Michael Riepe if (pwd->pw_uid == 0) { if (hostname) syslog(LOG_NOTICE, _("ROOT LOGIN ON %s FROM %s"), - tty, hostname); + tty_name, hostname); else - syslog(LOG_NOTICE, _("ROOT LOGIN ON %s"), tty); + syslog(LOG_NOTICE, _("ROOT LOGIN ON %s"), tty_name); } else { if (hostname) - syslog(LOG_INFO, _("LOGIN ON %s BY %s FROM %s"), tty, + syslog(LOG_INFO, _("LOGIN ON %s BY %s FROM %s"), tty_name, pwd->pw_name, hostname); else - syslog(LOG_INFO, _("LOGIN ON %s BY %s"), tty, + syslog(LOG_INFO, _("LOGIN ON %s BY %s"), tty_name, pwd->pw_name); } @@ -1024,8 +1056,7 @@ Michael Riepe motd(); mail = getenv("MAIL"); - if (mail && stat(mail, &st) == 0 && st.st_size != 0 - && st.st_size != REDHAT_IGNORED_MAILSIZE) { + if (mail && stat(mail, &st) == 0 && st.st_size != 0) { printf(_("You have %smail.\n"), (st.st_mtime > st.st_atime) ? _("new ") : ""); } @@ -1034,7 +1065,6 @@ Michael Riepe signal(SIGALRM, SIG_DFL); signal(SIGQUIT, SIG_DFL); signal(SIGTSTP, SIG_IGN); - signal(SIGHUP, SIG_DFL); #ifdef USE_PAM /* @@ -1048,6 +1078,8 @@ Michael Riepe * Solution: use TIOCNOTTY and setsid(). */ signal(SIGINT, SIG_IGN); + signal(SIGHUP, SIG_IGN); /* ignore signal from TIOCNOTTY below */ + childPid = fork(); if (childPid < 0) { int errsv = errno; @@ -1057,7 +1089,6 @@ Michael Riepe exit(0); } else if (childPid) { /* parent - wait for child to finish, then cleanup session */ - signal(SIGHUP, SIG_IGN); /* ignore signal from TIOCNOTTY */ ioctl(0, TIOCNOTTY, NULL); signal(SIGHUP, SIG_DFL); @@ -1067,7 +1098,10 @@ Michael Riepe } /* child */ setsid(); + /* reopen, as we need controlling tty in the child */ + opentty(ttyn); #endif + signal(SIGHUP, SIG_DFL); signal(SIGINT, SIG_DFL); /* discard permissions last so can't get killed and drop core */ @@ -1192,7 +1226,7 @@ rootterm(char * ttyn) { struct ttyent *t; - return((t = getttynam(ttyn)) && t->ty_status&TTY_SECURE); + return((t = getttynam(ttyn)) && (t->ty_status&TTY_SECURE)); } #else { @@ -1286,7 +1320,7 @@ dolastlog(int quiet) { } memset((char *)&ll, 0, sizeof(ll)); time(&ll.ll_time); - xstrncpy(ll.ll_line, tty, sizeof(ll.ll_line)); + xstrncpy(ll.ll_line, tty_name, sizeof(ll.ll_line)); if (hostname) xstrncpy(ll.ll_host, hostname, sizeof(ll.ll_host)); @@ -1296,22 +1330,21 @@ dolastlog(int quiet) { } void -badlogin(const char *name) -{ +badlogin(const char *name) { if (failures == 1) { if (hostname) syslog(LOG_NOTICE, _("LOGIN FAILURE FROM %s, %s"), hostname, name); else syslog(LOG_NOTICE, _("LOGIN FAILURE ON %s, %s"), - tty, name); + tty_name, name); } else { if (hostname) syslog(LOG_NOTICE, _("%d LOGIN FAILURES FROM %s, %s"), failures, hostname, name); else syslog(LOG_NOTICE, _("%d LOGIN FAILURES ON %s, %s"), - failures, tty, name); + failures, tty_name, name); } } diff --git a/login-utils/login.h b/login-utils/login.h index 14b698e3..c64502dc 100644 --- a/login-utils/login.h +++ b/login-utils/login.h @@ -1,7 +1,7 @@ /* defined in login.c */ extern void badlogin(const char *s); extern void sleepexit(int); -extern struct hostent hostaddress; +extern char hostaddress[4]; extern char *hostname; /* defined in checktty.c */ diff --git a/login-utils/shutdown.c b/login-utils/shutdown.c index 036064aa..c7efe746 100644 --- a/login-utils/shutdown.c +++ b/login-utils/shutdown.c @@ -46,6 +46,9 @@ * - do not unmount devfs (otherwise get harmless but annoying messages) * - created syncwait() for faster shutting down * - kill getty processes + * 2001-05-12 Richard Gooch + * - unblock all signals (sigmask from simpleinit(8) stopped sleep(3)) + * - close all files */ #include @@ -137,14 +140,18 @@ iswhitespace(int a) { int main(int argc, char *argv[]) { - int c,i; - int fd; + int c, i, fd; char *ptr; - if (getpid () == 1) { - for (i = 0; i < getdtablesize (); i++) close (i); - while (1) wait (NULL); /* Grim reaper never stops */ + i = getdtablesize (); + for (fd = 3; fd < i; fd++) close (fd); + if (getpid () == 1) + { + for (fd = 0; fd < 3; fd++) close (fd); + while (1) wait (NULL); /* Grim reaper never stops */ } + sigsetmask (0); /* simpleinit(8) blocks all signals: undo for ALRM */ + for (i = 1; i < NSIG; i++) signal (i, SIG_DFL); setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); @@ -373,6 +380,7 @@ main(int argc, char *argv[]) #ifndef DEBUGGING /* a gentle kill of all other processes except init */ kill_mortals (SIGTERM); + for (fd = 0; fd < 3; fd++) close (fd); stop_finalprog (); sleep (1); /* Time for saves to start */ kill (1, SIGTERM); /* Tell init to kill spawned gettys */ @@ -381,11 +389,10 @@ main(int argc, char *argv[]) system ("/sbin/initctl -r"); /* Roll back services */ syncwait (1); my_puts ("Sending SIGTERM to all remaining processes..."); - kill(-1, SIGTERM); - sleep(2); /* default 2, some people need 5 */ + kill (-1, SIGTERM); + sleep (2); /* Default 2, some people need 5 */ - /* now use brute force... */ - kill(-1, SIGKILL); + kill (-1, SIGKILL); /* Now use brute force... */ /* turn off accounting */ acct(NULL); @@ -472,7 +479,8 @@ write_user(struct utmp *ut) if((fd = open(term, O_WRONLY|O_NONBLOCK)) < 0) return; - sprintf(msg, _("\007URGENT: broadcast message from %s:"), whom); + msg[0] = '\007'; /* gettext crashes on \a */ + sprintf(msg+1, _("URGENT: broadcast message from %s:"), whom); WRCRLF; WR(msg); WRCRLF; diff --git a/login-utils/simpleinit.8 b/login-utils/simpleinit.8 index f367f2f6..2c3e08b2 100644 --- a/login-utils/simpleinit.8 +++ b/login-utils/simpleinit.8 @@ -1,7 +1,7 @@ .\" Copyright 1992, 1993 Rickard E. Faith (faith@cs.unc.edu) .\" May be distributed under the GNU General Public License .\" " for emacs's hilit19 mode :-) -.TH SIMPLEINIT 8 "4 November 2000" "Linux 0.99" "Linux Programmer's Manual" +.TH SIMPLEINIT 8 "25 February 2001" "Linux 0.99" "Linux Programmer's Manual" .SH NAME simpleinit \- process control initialization .SH SYNOPSIS @@ -97,12 +97,15 @@ parallel. See the \fBneed\fP(8) programme for details on how to elegantly control order of execution and manage dependencies. The \fBPATH\fP value is assigned to the PATH environment variable of -child processes (boot scripts). The \fBINIT_PATH\fP value is used by -simpleinit(8) itself to find the location of scripts to run (if an -absolute path is not given). If unset the default value \fBPATH\fP is -used. This separation allows boot scripts to invoke programmes of the -same name without conflict and without needing to specify absolute -paths. +child processes (boot scripts). + +The \fBINIT_PATH\fP value is used by simpleinit(8) itself to find the +location of scripts to run (if an absolute path is not given). If +unset and the boot programme is a directory, that directory is used. +Finally, if the script cannot be found in this path, the standard +\fBPATH\fP is used. This separation allows boot scripts to invoke +programmes of the same name without conflict and without needing to +specify absolute paths. The \fBfinalprog\fP value specifies the path of the programme to run after all \fBgetty\fP(8) instances are spawned. At bootup, it is @@ -151,7 +154,7 @@ remount (read-only) the root filesystem, even if the old inode for the .BR getty (8), .BR agetty (8), .BR shutdown (8), -.BR need (8) +.BR initctl (8) .SH BUGS This program is called .B simpleinit diff --git a/login-utils/simpleinit.c b/login-utils/simpleinit.c index 56f10455..9c08a03a 100644 --- a/login-utils/simpleinit.c +++ b/login-utils/simpleinit.c @@ -1,5 +1,5 @@ /* simpleinit.c - poe@daimi.aau.dk */ -/* Version 2.0.1 */ +/* Version 2.0.2 */ /* 1999-02-22 Arkadiusz Mi¶kiewicz * - added Native Language Support @@ -9,6 +9,10 @@ * - fixed race when reading from pipe and reaping children * 2001-02-18 sam@quux.dropbear.id.au * - fixed bug in : multiple INIT_PATH components did not work + * 2001-02-21 Richard Gooch + * - block signals in handlers, so that longjmp() doesn't kill context + * 2001-02-25 Richard Gooch + * - make default INIT_PATH the boot_prog (if it is a directory) - YECCH */ #include @@ -76,6 +80,8 @@ static char script_prefix[PATH_SIZE] = "\0"; static char final_prog[PATH_SIZE] = "\0"; static char init_path[PATH_SIZE] = "\0"; static int caught_sigint = 0; +static int no_reboot = 0; +static pid_t rc_child = -1; static const char *initctl_name = "/dev/initctl"; static int initctl_fd = -1; static volatile int do_longjmp = 0; @@ -89,9 +95,9 @@ static int process_path (const char *path, int (*func) (const char *path), static int preload_file (const char *path); static int run_file (const char *path); static void spawn (int i), read_inittab (void); -static void hup_handler (int sig); +static void sighup_handler (int sig); static void sigtstp_handler (int sig); -static void int_handler (int sig); +static void sigint_handler (int sig); static void sigchild_handler (int sig); static void sigquit_handler (int sig); static void sigterm_handler (int sig); @@ -134,7 +140,7 @@ static void enter_single (void) int main(int argc, char *argv[]) { - int vec,i; + int vec, i; int want_single = 0; pid_t pid; struct sigaction sa; @@ -143,8 +149,10 @@ int main(int argc, char *argv[]) #ifdef SET_TZ set_tz(); #endif - signal (SIGINT, int_handler); - sigemptyset (&sa.sa_mask); + sigfillset (&sa.sa_mask); /* longjmp and nested signals don't mix */ + sa.sa_flags = SA_ONESHOT; + sa.sa_handler = sigint_handler; + sigaction (SIGINT, &sa, NULL); sa.sa_flags = 0; sa.sa_handler = sigtstp_handler; sigaction (SIGTSTP, &sa, NULL); @@ -166,6 +174,7 @@ int main(int argc, char *argv[]) read_inittab (); for (i = 1; i < argc; i++) { if (strcmp (argv[i], "single") == 0) want_single = 1; + else if (strcmp (argv[i], "-noreboot") == 0) no_reboot = 1; else { char path[PATH_SIZE]; @@ -175,6 +184,17 @@ int main(int argc, char *argv[]) strcpy (boot_prog, path); } } + if (init_path[0] == '\0') + { + struct stat statbuf; + + if ( (stat (boot_prog, &statbuf) == 0) && S_ISDIR (statbuf.st_mode) ) + { + strcpy (init_path, boot_prog); + i = strlen (init_path); + if (init_path[i - 1] == '/') init_path[i - 1] = '\0'; + } + } if ( ( initctl_fd = open (initctl_name, O_RDWR, 0) ) < 0 ) { mkfifo (initctl_name, S_IRUSR | S_IWUSR); @@ -185,12 +205,12 @@ int main(int argc, char *argv[]) if ( want_single || (access (_PATH_SINGLE, R_OK) == 0) ) do_single (); /*If we get a SIGTSTP before multi-user mode, do nothing*/ - while(stopped) + while (stopped) pause(); if ( do_rc_tty (boot_prog) ) do_single (); - while(stopped) /*Also if /etc/rc fails & we get SIGTSTP*/ + while (stopped) /* Also if /etc/rc fails & we get SIGTSTP */ pause(); write_wtmp(); /* write boottime record */ @@ -204,7 +224,7 @@ int main(int argc, char *argv[]) } exit(0); #endif - signal(SIGHUP, hup_handler); + signal (SIGHUP, sighup_handler); /* Better semantics with signal(2) */ for (i = 0; i < getdtablesize (); i++) if (i != initctl_fd) close (i); @@ -326,14 +346,14 @@ static void do_single (void) static int do_rc_tty (const char *path) { int status; - pid_t pid, child; + pid_t pid; sigset_t ss; if (caught_sigint) return 0; process_path (path, preload_file, 0); /* Launch off a subprocess to start a new session (required for frobbing the TTY) and capture control-C */ - switch ( child = fork () ) + switch ( rc_child = fork () ) { case 0: /* Child */ for (status = 1; status < NSIG; status++) signal (status, SIG_DFL); @@ -355,12 +375,12 @@ static int do_rc_tty (const char *path) process_path (path, run_file, 0); while (1) { - if ( ( pid = mywait (&status) ) == child ) + if ( ( pid = mywait (&status) ) == rc_child ) return (WTERMSIG (status) == SIGINT) ? 0 : 1; if (pid < 0) break; } - kill (child, SIGKILL); - while (waitpid (child, NULL, 0) != child) /* Nothing */; + kill (rc_child, SIGKILL); + while (waitpid (rc_child, NULL, 0) != rc_child) /* Nothing */; return 0; } /* End Function do_rc_tty */ @@ -601,17 +621,16 @@ static void read_inittab (void) if (access (path, R_OK | X_OK) == 0) strcpy (boot_prog, path); } -} +} /* End Function read_inittab */ -static void hup_handler (int sig) +static void sighup_handler (int sig) { int i,j; int oldnum; struct initline savetab[NUMCMD]; int had_already; - (void) signal(SIGHUP, SIG_IGN); - + signal (SIGHUP, SIG_IGN); memcpy(savetab, inittab, NUMCMD * sizeof(struct initline)); oldnum = numcmd; read_inittab (); @@ -625,16 +644,15 @@ static void hup_handler (int sig) spawn(i); } } - if(!had_already) spawn(i); + if (!had_already) spawn (i); } - - (void) signal(SIGHUP, hup_handler); -} + signal (SIGHUP, sighup_handler); +} /* End Function sighup_handler */ static void sigtstp_handler (int sig) { stopped = ~stopped; - if (!stopped) hup_handler (sig); + if (!stopped) sighup_handler (sig); } /* End Function sigtstp_handler */ static void sigterm_handler (int sig) @@ -645,22 +663,23 @@ static void sigterm_handler (int sig) if (inittab[i].pid > 0) kill (inittab[i].pid, SIGTERM); } /* End Function sigterm_handler */ -static void int_handler (int sig) +static void sigint_handler (int sig) { - pid_t pid; - - caught_sigint = 1; - sync(); - sync(); - pid = fork(); - if (pid > 0) - return; - if (pid == 0) /* reboot properly... */ - execl(_PATH_REBOOT, _PATH_REBOOT, (char *)0); + pid_t pid; - /* fork or exec failed, try the hard way... */ - my_reboot(LINUX_REBOOT_CMD_RESTART); -} + caught_sigint = 1; + kill (rc_child, SIGKILL); + if (no_reboot) _exit (1) /*kill (0, SIGKILL)*/; + sync (); + sync (); + pid = fork (); + if (pid > 0) return; /* Parent */ + if (pid == 0) /* Child: reboot properly... */ + execl (_PATH_REBOOT, _PATH_REBOOT, (char *) 0); + + /* fork or exec failed, try the hard way... */ + my_reboot (LINUX_REBOOT_CMD_RESTART); +} /* End Function sigint_handler */ static void sigchild_handler (int sig) { @@ -708,7 +727,7 @@ static void write_wtmp (void) flock(lf, LOCK_UN|LOCK_NB); close(lf); } -} +} /* End Function write_wtmp */ struct needer_struct @@ -885,7 +904,9 @@ static void process_command (const struct command_struct *command) dup2 (1, 2); execlp (get_path (victim->first_service->name), victim->first_service->name, "stop", NULL); - err ( _("error running programme\n") ); + sprintf (txt, _("error stopping service: \"%s\""), + victim->first_service->name); + err (txt); _exit (SIG_NOT_STOPPED); } else if (pid == -1) break; /* Error */ diff --git a/login-utils/wall.c b/login-utils/wall.c index 3a13fe7b..744c910f 100644 --- a/login-utils/wall.c +++ b/login-utils/wall.c @@ -199,7 +199,8 @@ makemsg(fname) exit(1); } if (!freopen(fname, "r", stdin)) { - fprintf(stderr, _("%s: can't read %s.\n"), progname, fname); + fprintf(stderr, _("%s: can't read %s.\n"), + progname, fname); exit(1); } } @@ -212,16 +213,16 @@ makemsg(fname) putc('\r', fp); putc('\n', fp); cnt = 0; - } else { - carefulputc(ch, fp); } + carefulputc(ch, fp); } } - (void)fprintf(fp, "%79s\r\n", " "); + fprintf(fp, "%79s\r\n", " "); rewind(fp); if (fstat(fd, &sbuf)) { - (void)fprintf(stderr, _("%s: can't stat temporary file.\n"), progname); + fprintf(stderr, _("%s: can't stat temporary file.\n"), + progname); exit(1); } mbufsize = sbuf.st_size; diff --git a/misc-utils/Makefile b/misc-utils/Makefile index 9fedca66..8edf14ed 100644 --- a/misc-utils/Makefile +++ b/misc-utils/Makefile @@ -11,7 +11,7 @@ include ../MCONFIG MAN1= cal.1 chkdupexe.1 ddate.1 kill.1 \ logger.1 look.1 mcookie.1 namei.1 rename.1 script.1 \ - whereis.1 write.1 + whereis.1 # Where to put binaries? # See the "install" rule for the links. . . @@ -19,7 +19,7 @@ MAN1= cal.1 chkdupexe.1 ddate.1 kill.1 \ BIN= kill USRBIN= cal chkdupexe ddate logger look mcookie \ - namei rename script whereis write + namei rename script whereis MAYBE= reset setterm @@ -28,6 +28,11 @@ USRBIN:=$(USRBIN) reset MAN1:=$(MAN1) reset.1 endif +ifeq "$(HAVE_WRITE)" "no" +USRBIN:=$(USRBIN) write +MAN1:=$(MAN1) write.1 +endif + ifeq "$(HAVE_NCURSES)" "yes" USRBIN:=$(USRBIN) setterm MAN1:=$(MAN1) setterm.1 @@ -89,10 +94,12 @@ install: all $(INSTALLBIN) $(USRBIN) $(USRBINDIR) $(INSTALLDIR) $(MAN1DIR) $(MAN8DIR) $(INSTALLMAN) $(MAN1) $(MAN1DIR) +ifeq "$(HAVE_WRITE)" "no" ifeq "$(USE_TTY_GROUP)" "yes" chgrp tty $(USRBINDIR)/write chmod g+s $(USRBINDIR)/write endif +endif .PHONY: clean clean: diff --git a/misc-utils/cal.1 b/misc-utils/cal.1 index 9bade9d0..d16d3050 100644 --- a/misc-utils/cal.1 +++ b/misc-utils/cal.1 @@ -43,7 +43,7 @@ .Sh SYNOPSIS .Nm cal .Op Fl mjy13 -.Op Ar month Op Ar year +.Op [ Ar month ] Ar year .Sh DESCRIPTION .Nm Cal displays a simple calendar. diff --git a/misc-utils/look.1 b/misc-utils/look.1 index 2ab162c8..5233f700 100644 --- a/misc-utils/look.1 +++ b/misc-utils/look.1 @@ -64,7 +64,7 @@ is invoked with). If .Ar file is not specified, the file -.Pa /usr/dict/words +.Pa /usr/share/dict/words is used, only alphanumeric characters are compared and the case of alphabetic characters is ignored. .Pp @@ -77,7 +77,7 @@ are compared. Ignore the case of alphabetic characters. .It Fl a Use the alternate dictionary -.Pa /usr/dict/web2 +.Pa /usr/share/dict/web2 .It Fl t Specify a string termination character, i.e. only the characters in @@ -92,10 +92,10 @@ The utility exits 0 if one or more lines were found and displayed, 1 if no lines were found, and >1 if an error occurred. .Sh FILES -.Bl -tag -width /usr/dict/words -compact -.It Pa /usr/dict/words +.Bl -tag -width /usr/share/dict/words -compact +.It Pa /usr/share/dict/words the dictionary -.It Pa /usr/dict/web2 +.It Pa /usr/share/dict/web2 the alternate dictionary .El .Sh SEE ALSO diff --git a/misc-utils/script.c b/misc-utils/script.c index 951fc763..de158cd3 100644 --- a/misc-utils/script.c +++ b/misc-utils/script.c @@ -67,6 +67,7 @@ void finish(int); void done(void); void fail(void); +void resize(int); void fixtty(void); void getmaster(void); void getslave(void); @@ -189,7 +190,8 @@ main(int argc, char **argv) { dooutput(); else doshell(); - } + } else + (void) signal(SIGWINCH, resize); doinput(); return 0; @@ -201,9 +203,7 @@ doinput() { char ibuf[BUFSIZ]; (void) fclose(fscript); -#ifdef HAVE_openpty - (void) close(slave); -#endif + while ((cc = read(0, ibuf, BUFSIZ)) > 0) (void) write(master, ibuf, cc); done(); @@ -225,6 +225,15 @@ finish(int dummy) { done(); } +void +resize(int dummy) { + /* transmit window change information to the child */ + (void) ioctl(0, TIOCGWINSZ, (char *)&win); + (void) ioctl(slave, TIOCSWINSZ, (char *)&win); + + kill(child, SIGWINCH); +} + void dooutput() { register int cc; diff --git a/mount/Makefile b/mount/Makefile index ef65601f..453b640a 100644 --- a/mount/Makefile +++ b/mount/Makefile @@ -44,11 +44,11 @@ install: $(PROGS) mount: mount.o fstab.o sundries.o realpath.o mntent.o version.o \ mount_guess_fstype.o mount_by_label.o getusername.o \ - $(LIB)/setproctitle.o $(NFS_OBJS) $(LO_OBJS) + $(LIB)/setproctitle.o $(LIB)/env.o $(NFS_OBJS) $(LO_OBJS) $(LINK) $^ -o $@ umount: umount.o fstab.o sundries.o realpath.o mntent.o getusername.o \ - version.o $(LO_OBJS) + version.o $(LIB)/env.o $(LO_OBJS) $(LINK) $^ -o $@ swapon: swapon.o version.o diff --git a/mount/linux_fs.h b/mount/linux_fs.h index 043ac16a..97857389 100644 --- a/mount/linux_fs.h +++ b/mount/linux_fs.h @@ -48,12 +48,18 @@ struct ext_super_block { #define EXT2_PRE_02B_MAGIC 0xEF51 #define EXT2_SUPER_MAGIC 0xEF53 +#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004 struct ext2_super_block { - u_char s_dummy1[56]; - u_char s_magic[2]; - u_char s_dummy2[46]; - u_char s_uuid[16]; - u_char s_volume_name[16]; + u_char s_dummy1[56]; + u_char s_magic[2]; + u_char s_dummy2[34]; + u_char s_feature_compat[4]; + u_char s_feature_incompat[4]; + u_char s_feature_ro_compat[4]; + u_char s_uuid[16]; + u_char s_volume_name[16]; + u_char s_dummy3[88]; + u_char s_journal_inum[4]; /* ext3 only */ }; #define ext2magic(s) ((uint) s.s_magic[0] + (((uint) s.s_magic[1]) << 8)) @@ -102,7 +108,6 @@ struct fat_super_block { }; #define XFS_SUPER_MAGIC "XFSB" -#define XFS_SUPER_MAGIC2 "BSFX" struct xfs_super_block { u_char s_magic[4]; u_char s_dummy[28]; diff --git a/mount/mount.8 b/mount/mount.8 index 42a7a4a7..6f96457d 100644 --- a/mount/mount.8 +++ b/mount/mount.8 @@ -221,11 +221,7 @@ option below). It is possible to replace by a symbolic link to .IR /proc/mounts , but some information is lost that way, and in particular -working with the loop device will be less convenient. Also, -pathnames containing spaces are handled correctly by -.I /etc/mtab -but not (yet) by -.IR /proc/mounts . +working with the loop device will be less convenient. .SH OPTIONS The full set of options used by an invocation of @@ -442,7 +438,9 @@ flag followed by a comma separated string of options. Some of these options are only useful when they appear in the .I /etc/fstab file. The following options apply to any file system that is being -mounted: +mounted (but not every file system actually honors them - e.g., the +.B sync +option today has effect only for ext2 and ufs): .RS .TP .B async @@ -582,6 +580,8 @@ Give blocksize. Allowed values are 512, 1024, 2048, 4096. .TP .BR grpquota " / " noquota " / " quota " / " usrquota These options are accepted but ignored. +(However, quota utilities may react to such strings in +.IR /etc/fstab .) .SH "Mount options for coherent" None. @@ -1149,7 +1149,7 @@ UFS is a file system widely used in different operating systems. The problem are differences among implementations. Features of some implementations are undocumented, so its hard to recognize the type of ufs automatically. -That's why user must specify the type of ufs by mount option. +That's why the user must specify the type of ufs by mount option. Possible values are: .RS .TP diff --git a/mount/mount.c b/mount/mount.c index dc7e9823..8d62087e 100644 --- a/mount/mount.c +++ b/mount/mount.c @@ -66,6 +66,7 @@ #include "mount_guess_fstype.h" #include "mount_by_label.h" #include "getusername.h" +#include "env.h" #include "nls.h" #define DO_PS_FIDDLING @@ -244,7 +245,7 @@ print_one (const struct mntent *me) { /* Report on everything in mtab (of the specified types if any). */ static int -print_all (string_list types) { +print_all (char *types) { struct mntentchn *mc, *mc0; mc0 = mtab_head(); @@ -452,33 +453,51 @@ do_mount_syscall (struct mountargs *args) { * Mount a single file system. Guess the type when unknown. * returns: 0: OK, -1: error in errno, 1: other error * don't exit on non-fatal errors. + * on return types is filled with the type used. */ static int -guess_fstype_and_mount (char *spec, char *node, char **type, +guess_fstype_and_mount (char *spec, char *node, char **types, int flags, char *mount_opts) { struct mountargs args = { spec, node, NULL, flags & ~MS_NOSYS, mount_opts }; - if (*type && strcasecmp (*type, "auto") == 0) - *type = NULL; + if (*types && strcasecmp (*types, "auto") == 0) + *types = NULL; - if (!*type && (flags & (MS_BIND | MS_MOVE))) - *type = "none"; /* random, but not "bind" */ + if (!*types && (flags & (MS_BIND | MS_MOVE))) + *types = "none"; /* random, but not "bind" */ - if (!*type && !(flags & MS_REMOUNT)) { - *type = guess_fstype_from_superblock(spec); - if (*type && !strcmp(*type, "swap")) { + if (!*types && !(flags & MS_REMOUNT)) { + *types = guess_fstype_from_superblock(spec); + if (*types && !strcmp(*types, "swap")) { error(_("%s looks like swapspace - not mounted"), spec); - *type = NULL; + *types = NULL; return 1; } } - if (*type || (flags & MS_REMOUNT)) { - args.type = *type; + /* Accept a comma-separated list of types, and try them one by one */ + /* A list like "nonfs,.." indicates types not to use */ + if (*types && strncmp(*types, "no", 2) && index(*types,',')) { + char *t = strdup(*types); + char *p; + + while((p = index(t,',')) != NULL) { + *p = 0; + args.type = *types = t; + if(do_mount_syscall (&args) == 0) + return 0; + t = p+1; + } + /* do last type below */ + *types = t; + } + + if (*types || (flags & MS_REMOUNT)) { + args.type = *types; return do_mount_syscall (&args); } - return procfsloop(do_mount_syscall, &args, type); + return procfsloop(do_mount_syscall, &args, types); } /* @@ -715,7 +734,7 @@ check_special_mountprog(char *spec, char *node, char *type, int flags, * return status from wait */ static int -try_mount_one (const char *spec0, const char *node0, char *type0, +try_mount_one (const char *spec0, const char *node0, char *types0, const char *opts0, int freq, int pass, int bg, int ro) { int res, status; int mnt5_res = 0; /* only for gcc */ @@ -724,15 +743,16 @@ try_mount_one (const char *spec0, const char *node0, char *type0, char *extra_opts; /* written in mtab */ char *mount_opts; /* actually used on system call */ const char *opts; - char *spec, *node, *type; + char *spec, *node, *types; char *user = 0; int loop = 0; char *loopdev = 0, *loopfile = 0; struct stat statbuf; + int nfs_mount_version = 0; /* any version */ spec = xstrdup(spec0); node = xstrdup(node0); - type = xstrdup(type0); + types = xstrdup(types0); opts = xstrdup(opts0); parse_opts (xstrdup (opts), &flags, &extra_opts); @@ -753,22 +773,27 @@ try_mount_one (const char *spec0, const char *node0, char *type0, * stale assignments of files to loop devices. Nasty when used for * encryption. */ - res = loop_check (&spec, &type, &flags, &loop, &loopdev, &loopfile); + res = loop_check (&spec, &types, &flags, &loop, &loopdev, &loopfile); if (res) return res; } /* * Call mount.TYPE for types that require a separate mount program. - * For the moment these types are ncp and smb. + * For the moment these types are ncp and smb. Maybe also vxfs. + * All such special things must occur isolated in the types string. */ - if (check_special_mountprog (spec, node, type, flags, extra_opts, &status)) + if (check_special_mountprog (spec, node, types, flags, extra_opts, &status)) return status; - if (!fake && type && streq (type, "nfs")) { + /* + * Also nfs requires a separate program, but it is built in. + */ + if (!fake && types && streq (types, "nfs")) { #ifdef HAVE_NFS retry_nfs: - mnt_err = nfsmount (spec, node, &flags, &extra_opts, &mount_opts, bg); + mnt_err = nfsmount (spec, node, &flags, &extra_opts, &mount_opts, + &nfs_mount_version, bg); if (mnt_err) return mnt_err; #else @@ -780,7 +805,7 @@ retry_nfs: block_signals (SIG_BLOCK); if (!fake) - mnt5_res = guess_fstype_and_mount (spec, node, &type, flags & ~MS_NOSYS, + mnt5_res = guess_fstype_and_mount (spec, node, &types, flags & ~MS_NOSYS, mount_opts); if (fake || mnt5_res == 0) { @@ -790,7 +815,7 @@ retry_nfs: update_mtab_entry(loop ? loopfile : spec, node, - type ? type : "unknown", + types ? types : "unknown", fix_opts_string (flags & ~MS_NOMTAB, extra_opts, user), flags, freq, @@ -808,8 +833,7 @@ retry_nfs: block_signals (SIG_UNBLOCK); #ifdef HAVE_NFS - if (mnt_err && type && streq (type, "nfs")) { - extern int nfs_mount_version; + if (mnt_err && types && streq (types, "nfs")) { if (nfs_mount_version == 4) { if (verbose) printf(_("mount: failed with nfs mount version 4, trying 3..\n")); @@ -821,7 +845,7 @@ retry_nfs: /* Mount failed, complain, but don't die. */ - if (type == 0) { + if (types == 0) { if (suid) error (_("mount: I could not determine the filesystem type, " "and none was specified")); @@ -844,7 +868,7 @@ retry_nfs: case EBUSY: if (flags & MS_REMOUNT) { error (_("mount: %s is busy"), node); - } else if (!strcmp(type, "proc") && !strcmp(node, "/proc")) { + } else if (!strcmp(types, "proc") && !strcmp(node, "/proc")) { /* heuristic: if /proc/version exists, then probably proc is mounted */ if (stat ("/proc/version", &statbuf)) /* proc mounted? */ error (_("mount: %s is busy"), node); /* no */ @@ -926,16 +950,16 @@ retry_nfs: error (_("mount: %s: can't read superblock"), spec); break; case ENODEV: { int pfs; - if ((pfs = is_in_procfs(type)) == 1 || !strcmp(type, "guess")) + if ((pfs = is_in_procfs(types)) == 1 || !strcmp(types, "guess")) error(_("mount: %s: unknown device"), spec); else if (pfs == 0) { char *lowtype, *p; int u; - error (_("mount: fs type %s not supported by kernel"), type); + error (_("mount: fs type %s not supported by kernel"), types); /* maybe this loser asked for FAT or ISO9660 or isofs */ - lowtype = xstrdup(type); + lowtype = xstrdup(types); u = 0; for(p=lowtype; *p; p++) { if(tolower(*p) != *p) { @@ -950,7 +974,7 @@ retry_nfs: free(lowtype); } else error (_("mount: %s has wrong device number or fs type %s not supported"), - spec, type); + spec, types); break; } case ENOTBLK: @@ -981,7 +1005,7 @@ retry_nfs: } else { if (loop) { opts = opts0; - type = type0; + types = types0; } if (opts) { char *opts1 = realloc(xstrdup(opts), strlen(opts)+4); @@ -989,11 +1013,11 @@ retry_nfs: opts = opts1; } else opts = "ro"; - if (type && !strcmp(type, "guess")) - type = 0; + if (types && !strcmp(types, "guess")) + types = 0; error (_("mount: %s%s is write-protected, mounting read-only"), bd, spec0); - return try_mount_one (spec0, node0, type, opts, freq, pass, bg, 1); + return try_mount_one (spec0, node0, types, opts, freq, pass, bg, 1); } break; } @@ -1051,7 +1075,7 @@ usersubst(const char *opts) { * Return 0 for success (either mounted sth or -a and NOAUTO was given) */ static int -mount_one (const char *spec, const char *node, char *type, const char *opts, +mount_one (const char *spec, const char *node, char *types, const char *opts, char *cmdlineopts, int freq, int pass) { int status; int status2; @@ -1087,9 +1111,9 @@ mount_one (const char *spec, const char *node, char *type, const char *opts, /* if -a then we may be rescued by a noauto option */ } - if (type == NULL && !mounttype) { + if (types == NULL && !mounttype) { if (strchr (spec, ':') != NULL) { - type = "nfs"; + types = "nfs"; if (verbose) printf(_("mount: no type was given - " "I'll assume nfs because of the colon\n")); @@ -1100,7 +1124,7 @@ mount_one (const char *spec, const char *node, char *type, const char *opts, * Try to mount the file system. When the exit status is EX_BG, * we will retry in the background. Otherwise, we're done. */ - status = try_mount_one (spec, node, type, opts, freq, pass, 0, 0); + status = try_mount_one (spec, node, types, opts, freq, pass, 0, 0); if (status != EX_BG) return status; @@ -1113,10 +1137,10 @@ mount_one (const char *spec, const char *node, char *type, const char *opts, return 0; /* parent returns "success" */ spec = xstrdup(spec); /* arguments will be destroyed */ node = xstrdup(node); /* by set_proc_name() */ - type = xstrdup(type); + types = xstrdup(types); opts = xstrdup(opts); set_proc_name (spec); /* make a nice "ps" listing */ - status2 = try_mount_one (spec, node, type, opts, freq, pass, 1, 0); + status2 = try_mount_one (spec, node, types, opts, freq, pass, 1, 0); if (verbose && status2) printf (_("mount: giving up \"%s\"\n"), spec); exit (0); /* child stops here */ @@ -1153,7 +1177,7 @@ mounted (char *spec, char *node) { #define DISKMAJOR(m) (((int) m) & ~0xf) static int -mount_all (string_list types, char *options) { +mount_all (char *types, char *options) { struct mntentchn *mc, *mc0, *mtmp; int status = 0; struct stat statbuf; @@ -1330,10 +1354,11 @@ main (int argc, char *argv[]) { char *options = NULL, *spec, *node; char *volumelabel = NULL; char *uuid = NULL; - string_list types = NULL; + char *types = NULL; struct mntentchn *mc; int fd; + sanitize_env(); setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); @@ -1387,7 +1412,7 @@ main (int argc, char *argv[]) { sloppy = 1; break; case 't': /* specify file system types */ - types = parse_list (optarg); + types = optarg; break; case 'U': uuid = optarg; @@ -1472,7 +1497,7 @@ main (int argc, char *argv[]) { /* mount -a */ result = mount_all (types, options); if (result == 0 && verbose) - error(_("not mounted anything")); + error(_("nothing was mounted")); break; case 1: @@ -1524,14 +1549,7 @@ main (int argc, char *argv[]) { spec = argv[0]; node = argv[1]; } - if (types == NULL) - result = mount_one (spec, node, NULL, NULL, - options, 0, 0); - else if (cdr (types) == NULL) - result = mount_one (spec, node, car (types), NULL, - options, 0, 0); - else - usage (stderr, EX_USAGE); + result = mount_one (spec, node, types, NULL, options, 0, 0); break; default: diff --git a/mount/mount_by_label.c b/mount/mount_by_label.c index ad3b5ebd..18344e4b 100644 --- a/mount/mount_by_label.c +++ b/mount/mount_by_label.c @@ -58,8 +58,7 @@ get_label_uuid(const char *device, char **label, char *uuid) { } else if (lseek(fd, 0, SEEK_SET) == 0 && read(fd, (char *) &xfsb, sizeof(xfsb)) == sizeof(xfsb) - && (strncmp((char *) &xfsb.s_magic, XFS_SUPER_MAGIC, 4) == 0 || - strncmp((char *) &xfsb.s_magic, XFS_SUPER_MAGIC2,4) == 0)) { + && (strncmp(xfsb.s_magic, XFS_SUPER_MAGIC, 4) == 0)) { memcpy(uuid, xfsb.s_uuid, sizeof(xfsb.s_uuid)); namesize = sizeof(xfsb.s_fname); if ((*label = calloc(namesize + 1, 1)) != NULL) diff --git a/mount/mount_guess_fstype.c b/mount/mount_guess_fstype.c index a8740929..8694213d 100644 --- a/mount/mount_guess_fstype.c +++ b/mount/mount_guess_fstype.c @@ -57,6 +57,11 @@ swapped(unsigned short a) { return (a>>8) | (a<<8); } +static inline int +assemble4le(unsigned char *p) { + return (p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24)); +} + /* char *guess_fstype_from_superblock(const char *device); @@ -74,10 +79,11 @@ swapped(unsigned short a) { Added a very weak heuristic for vfat - aeb Added xfs - 2000-03-21 Martin K. Petersen Added cramfs, hfs, hpfs, adfs - Sepp Wijnands + Added ext3 - Andrew Morton */ static char *magic_known[] = { - "adfs", "bfs", "cramfs", "ext", "ext2", + "adfs", "bfs", "cramfs", "ext", "ext2", "ext3", "hfs", "hpfs", "iso9660", "minix", "ntfs", "qnx4", "romfs", "swap", "udf", "ufs", "xfs", "xiafs" @@ -180,9 +186,16 @@ fstype(const char *device) { PPC ext2 systems */ if (ext2magic(sb.e2s) == EXT2_SUPER_MAGIC || ext2magic(sb.e2s) == EXT2_PRE_02B_MAGIC - || ext2magic(sb.e2s) == swapped(EXT2_SUPER_MAGIC)) + || ext2magic(sb.e2s) == swapped(EXT2_SUPER_MAGIC)) { type = "ext2"; + /* maybe even ext3? */ + if ((assemble4le(sb.e2s.s_feature_compat) + & EXT3_FEATURE_COMPAT_HAS_JOURNAL) && + assemble4le(sb.e2s.s_journal_inum) != 0) + type = "ext3,ext2"; + } + else if (minixmagic(sb.ms) == MINIX_SUPER_MAGIC || minixmagic(sb.ms) == MINIX_SUPER_MAGIC2 || minixmagic(sb.ms) == swapped(MINIX_SUPER_MAGIC2)) @@ -200,8 +213,7 @@ fstype(const char *device) { type = "xiafs"; else if(!strncmp(xsb.romfs_magic, "-rom1fs-", 8)) type = "romfs"; - else if(!strncmp(xsb.xfsb.s_magic, XFS_SUPER_MAGIC, 4) || - !strncmp(xsb.xfsb.s_magic, XFS_SUPER_MAGIC2, 4)) + else if(!strncmp(xsb.xfsb.s_magic, XFS_SUPER_MAGIC, 4)) type = "xfs"; else if(!strncmp(xsb.qnx4fs_magic+4, "QNX4FS", 6)) type = "qnx4fs"; @@ -216,7 +228,10 @@ fstype(const char *device) { !strncmp(xsb.fatsb.s_os, "MSWIN", 5) || !strncmp(xsb.fatsb.s_os, "MTOOL", 5) || !strncmp(xsb.fatsb.s_os, "mkdosfs", 7) || - !strncmp(xsb.fatsb.s_os, "kmkdosfs", 8)) + !strncmp(xsb.fatsb.s_os, "kmkdosfs", 8) || + /* Michal Svec: created by fdformat, old msdos utility for + formatting large (1.7) floppy disks. */ + !strncmp(xsb.fatsb.s_os, "CH-FOR18", 8)) && (!strncmp(xsb.fatsb.s_fs, "FAT12 ", 8) || !strncmp(xsb.fatsb.s_fs, "FAT16 ", 8) || !strncmp(xsb.fatsb.s_fs2, "FAT32 ", 8))) @@ -363,19 +378,28 @@ is_in_procfs(const char *type) { return ret; } +/* Try all types in FILESYSTEMS, except those in *types, + in case *types starts with "no" */ /* return: 0: OK, -1: error in errno, 1: type not found */ -/* when 1 is returned, *type is NULL */ +/* when 0 or -1 is returned, *types contains the type used */ +/* when 1 is returned, *types is NULL */ int procfsloop(int (*mount_fn)(struct mountargs *), struct mountargs *args, - char **type) { + char **types) { char *files[2] = { ETC_FILESYSTEMS, PROC_FILESYSTEMS }; FILE *procfs; char *fsname; + char *notypes = NULL; + int no = 0; int ret = 1; int errsv = 0; int i; - *type = NULL; + if (!strncmp(*types, "no", 2)) { + no = 1; + notypes = (*types) + 2; + } + *types = NULL; /* Use PROC_FILESYSTEMS only when ETC_FILESYSTEMS does not exist. In some cases trying a filesystem that the kernel knows about @@ -396,18 +420,20 @@ procfsloop(int (*mount_fn)(struct mountargs *), struct mountargs *args, } if (tested (fsname)) continue; + if (no && matching_type(fsname, notypes)) + continue; args->type = fsname; if (verbose) { printf(_("Trying %s\n"), fsname); fflush(stdout); } if ((*mount_fn) (args) == 0) { - *type = fsname; + *types = fsname; ret = 0; break; } else if (errno != EINVAL && is_in_procfs(fsname) == 1) { - *type = "guess"; + *types = "guess"; ret = -1; errsv = errno; break; diff --git a/mount/nfs.5 b/mount/nfs.5 index 6ffce6cd..b29a8bdb 100644 --- a/mount/nfs.5 +++ b/mount/nfs.5 @@ -143,6 +143,10 @@ NFS daemon on the remote host. This option is useful for hosts that can run multiple NFS servers. The default value is version 2. .TP 1.5i +.I nolock +Disable NFS locking. This has to be used with some old NFS servers +that don't support locking. +.TP 1.5i .I bg If the first NFS mount attempt times out, retry the mount in the background. diff --git a/mount/nfsmount.c b/mount/nfsmount.c index 70298e0c..d81c062e 100644 --- a/mount/nfsmount.c +++ b/mount/nfsmount.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -85,11 +86,6 @@ linux_version_code(void) { return 0; } -/* - * nfs_mount_version according to the sources seen at compile time. - */ -int nfs_mount_version = NFS_MOUNT_VERSION; - /* * Unfortunately, the kernel prints annoying console messages * in case of an unexpected nfs mount version (instead of @@ -100,14 +96,13 @@ int nfs_mount_version = NFS_MOUNT_VERSION; * NFS_MOUNT_VERSION: these nfsmount sources at compile time * nfs_mount_version: version this source and running kernel can handle */ -static void +static int find_kernel_nfs_mount_version(void) { - static int kernel_version = 0; + static int kernel_version = -1; + int nfs_mount_version = NFS_MOUNT_VERSION; - if (kernel_version) - return; - - kernel_version = linux_version_code(); + if (kernel_version == -1) + kernel_version = linux_version_code(); if (kernel_version) { if (kernel_version < MAKE_VERSION(2,1,32)) @@ -123,6 +118,7 @@ find_kernel_nfs_mount_version(void) { } if (nfs_mount_version > NFS_MOUNT_VERSION) nfs_mount_version = NFS_MOUNT_VERSION; + return nfs_mount_version; } static struct pmap * @@ -130,7 +126,8 @@ get_mountport(struct sockaddr_in *server_addr, long unsigned prog, long unsigned version, long unsigned proto, - long unsigned port) + long unsigned port, + int nfs_mount_version) { struct pmaplist *pmap; static struct pmap p = {0, 0, 0, 0}; @@ -174,20 +171,19 @@ get_mountport(struct sockaddr_in *server_addr, } int nfsmount(const char *spec, const char *node, int *flags, - char **extra_opts, char **mount_opts, int running_bg) + char **extra_opts, char **mount_opts, int *nfs_mount_vers, + int running_bg) { static char *prev_bg_host; char hostdir[1024]; CLIENT *mclient; - char *hostname; - char *dirname; - char *old_opts; - char *mounthost=NULL; + char *hostname, *dirname, *old_opts, *mounthost = NULL; char new_opts[1024]; struct timeval total_timeout; enum clnt_stat clnt_stat; static struct nfs_mount_data data; char *opt, *opteq; + int nfs_mount_version; int val; struct hostent *hp; struct sockaddr_in server_addr; @@ -201,29 +197,20 @@ int nfsmount(const char *spec, const char *node, int *flags, } status; struct stat statbuf; char *s; - int port; - int mountport; - int proto; - int bg; - int soft; - int intr; - int posix; - int nocto; - int noac; - int nolock; - int broken_suid; - int retry; - int tcp; - int mountprog; - int mountvers; - int nfsprog; - int nfsvers; + int port, mountport, proto, bg, soft, intr; + int posix, nocto, noac, nolock, broken_suid; + int retry, tcp; + int mountprog, mountvers, nfsprog, nfsvers; int retval; time_t t; time_t prevt; time_t timeout; - find_kernel_nfs_mount_version(); + /* The version to try is either specified or 0 + In case it is 0 we tell the caller what we tried */ + if (!*nfs_mount_vers) + *nfs_mount_vers = find_kernel_nfs_mount_version(); + nfs_mount_version = *nfs_mount_vers; retval = EX_FAIL; msock = fsock = -1; @@ -242,12 +229,14 @@ int nfsmount(const char *spec, const char *node, int *flags, until they can be fully supported. (mack@sgi.com) */ if ((s = strchr(hostdir, ','))) { *s = '\0'; - fprintf(stderr, _("mount: warning: " - "multiple hostnames not supported\n")); + fprintf(stderr, + _("mount: warning: " + "multiple hostnames not supported\n")); } } else { - fprintf(stderr, _("mount: " - "directory to mount not in host:dir format\n")); + fprintf(stderr, + _("mount: " + "directory to mount not in host:dir format\n")); goto fail; } @@ -380,15 +369,14 @@ int nfsmount(const char *spec, const char *node, int *flags, else #endif printf(_("Warning: Option namlen is not supported.\n")); - } else if (!strcmp(opt, "addr")) + } else if (!strcmp(opt, "addr")) { /* ignore */; - else { + } else { printf(_("unknown nfs mount parameter: " "%s=%d\n"), opt, val); goto fail; } - } - else { + } else { val = 1; if (!strncmp(opt, "no", 2)) { val = 0; @@ -459,9 +447,8 @@ int nfsmount(const char *spec, const char *node, int *flags, } if (nfsvers && !mountvers) mountvers = (nfsvers < 3) ? 1 : nfsvers; - if (nfsvers && nfsvers < mountvers) { + if (nfsvers && nfsvers < mountvers) mountvers = nfsvers; - } /* Adjust options if none specified */ if (!data.timeo) @@ -515,7 +502,7 @@ int nfsmount(const char *spec, const char *node, int *flags, } else { if ((hp = gethostbyname(mounthost)) == NULL) { fprintf(stderr, _("mount: can't get address for %s\n"), - hostname); + mounthost); goto fail; } else { if (hp->h_length > sizeof(struct in_addr)) { @@ -573,7 +560,8 @@ int nfsmount(const char *spec, const char *node, int *flags, mountprog, mountvers, proto, - mountport); + mountport, + nfs_mount_version); /* contact the mount daemon via TCP */ mount_server_addr.sin_port = htons(pm_mnt->pm_port); @@ -724,6 +712,18 @@ int nfsmount(const char *spec, const char *node, int *flags, server_addr.sin_port = PMAPPORT; port = pmap_getport(&server_addr, nfsprog, nfsvers, tcp ? IPPROTO_TCP : IPPROTO_UDP); +#if 1 + /* Here we check to see if user is mounting with the + * tcp option. If so, and if the portmap returns a + * '0' for port (service unavailable), we then exit, + * notifying the user, rather than hanging up mount. + */ + if (port == 0 && tcp == 1) { + perror(_("nfs server reported service unavailable")); + goto fail; + } +#endif + if (port == 0) port = NFS_PORT; #ifdef NFS_MOUNT_DEBUG diff --git a/mount/realpath.c b/mount/realpath.c index 374f8a3a..61832efd 100644 --- a/mount/realpath.c +++ b/mount/realpath.c @@ -13,12 +13,17 @@ * GNU Library Public License for more details. */ +#undef resolve_symlinks + /* * This routine is part of libc. We include it nevertheless, * since the libc version has some security flaws. */ #include /* for PATH_MAX */ +#ifndef PATH_MAX +#define PATH_MAX 8192 +#endif #include #include #include @@ -30,10 +35,14 @@ /* this leaks some memory - unimportant for mount */ char * myrealpath(const char *path, char *resolved_path, int maxreslth) { - char *npath, *buf; - char link_path[PATH_MAX+1]; int readlinks = 0; - int m, n; + char *npath; + char link_path[PATH_MAX+1]; + int n; +#ifdef resolve_symlinks + char *buf; + int m; +#endif npath = resolved_path; @@ -85,7 +94,7 @@ myrealpath(const char *path, char *resolved_path, int maxreslth) { return NULL; } - /* See if latest pathname component is a symlink. */ + /* See if last pathname component is a symlink. */ *npath = '\0'; n = readlink(resolved_path, link_path, PATH_MAX); if (n < 0) { @@ -93,6 +102,7 @@ myrealpath(const char *path, char *resolved_path, int maxreslth) { if (errno != EINVAL) return NULL; } else { +#ifdef resolve_symlinks /* Richard Gooch dislikes sl resolution */ /* Note: readlink doesn't add the null byte. */ link_path[n] = '\0'; if (*link_path == '/') @@ -109,8 +119,8 @@ myrealpath(const char *path, char *resolved_path, int maxreslth) { memcpy(buf, link_path, n); memcpy(buf + n, path, m + 1); path = buf; +#endif } - *npath++ = '/'; } /* Delete trailing slash but don't whomp a lone slash. */ diff --git a/mount/sundries.c b/mount/sundries.c index 1da3b666..59b06967 100644 --- a/mount/sundries.c +++ b/mount/sundries.c @@ -18,17 +18,6 @@ #include "nfsmount.h" #include "nls.h" -/* String list constructor. (car() and cdr() are defined in "sundries.h"). */ -string_list -cons (char *a, const string_list b) { - string_list p; - - p = xmalloc (sizeof *p); - car (p) = a; - cdr (p) = b; - return p; -} - void * xmalloc (size_t size) { void *t; @@ -157,57 +146,43 @@ die (int err, const char *fmt, ...) { exit (err); } -/* Parse a list of strings like str[,str]... into a string list. */ -string_list -parse_list (char *strings) { - string_list list; - char *s, *t; - - if (strings == NULL) - return NULL; - - /* strtok() destroys its argument, so we have to use a copy */ - s = xstrdup(strings); - - list = cons (strtok (s, ","), NULL); - - while ((t = strtok (NULL, ",")) != NULL) - list = cons (t, list); - - return list; -} - /* True if fstypes match. Null *TYPES means match anything, - except that swap types always return false. - This routine has some ugliness to deal with ``no'' types. - Fixed bug: the `no' part comes at the end - aeb, 970216 */ + except that swap types always return false. */ +/* Accept nonfs,proc,devpts and nonfs,noproc,nodevpts + with the same meaning. */ int -matching_type (const char *type, string_list types) { - char *notype; - int foundyes, foundno; - int no; /* true if a "no" type match, eg -t nominix */ +matching_type (const char *type, const char *types) { + int no; /* negated types list */ + int len; + const char *p; if (streq (type, MNTTYPE_SWAP)) return 0; if (types == NULL) return 1; - if ((notype = alloca (strlen (type) + 3)) == NULL) - die (EX_SYSERR, _("%s: Out of memory!\n"), "mount"); - sprintf (notype, "no%s", type); - - foundyes = foundno = no = 0; - while (types != NULL) { - if (cdr (types) == NULL) - no = (car (types)[0] == 'n') && (car (types)[1] == 'o'); - if (streq (type, car (types))) - foundyes = 1; - else if (streq (notype, car (types))) - foundno = 1; - types = cdr (types); + no = 0; + if (!strncmp(types, "no", 2)) { + no = 1; + types += 2; } - return (foundno ? 0 : (no ^ foundyes)); + /* Does type occur in types, separated by commas? */ + len = strlen(type); + p = types; + while(1) { + if (!strncmp(p, "no", 2) && !strncmp(p+2, type, len) && + (p[len+2] == 0 || p[len+2] == ',')) + return 0; + if (strncmp(p, type, len) == 0 && + (p[len] == 0 || p[len] == ',')) + return !no; + p = index(p,','); + if (!p) + break; + p++; + } + return no; } /* Make a canonical pathname from PATH. Returns a freshly malloced string. diff --git a/mount/sundries.h b/mount/sundries.h index 742d761f..5b91ca1e 100644 --- a/mount/sundries.h +++ b/mount/sundries.h @@ -19,26 +19,12 @@ extern int sloppy; #define streq(s, t) (strcmp ((s), (t)) == 0) - -/* String list data structure. */ -typedef struct string_list -{ - char *hd; - struct string_list *tl; -} *string_list; - -#define car(p) ((p) -> hd) -#define cdr(p) ((p) -> tl) - -string_list cons (char *a, const string_list); - /* Functions in sundries.c that are used in mount.c and umount.c */ void block_signals (int how); char *canonicalize (const char *path); char *realpath (const char *path, char *resolved_path); void error (const char *fmt, ...); -int matching_type (const char *type, string_list types); -string_list parse_list (char *strings); +int matching_type (const char *type, const char *types); void *xmalloc (size_t size); char *xstrdup (const char *s); char *xstrndup (const char *s, int n); @@ -50,7 +36,7 @@ void die (int errcode, const char *fmt, ...); #ifdef HAVE_NFS int nfsmount (const char *spec, const char *node, int *flags, - char **orig_opts, char **opt_args, int running_bg); + char **orig_opts, char **opt_args, int *version, int running_bg); #endif /* exit status - bits below are ORed */ diff --git a/mount/swapon.c b/mount/swapon.c index 829acadd..b87a021a 100644 --- a/mount/swapon.c +++ b/mount/swapon.c @@ -90,15 +90,22 @@ swap (const char *special, int prio) if (streq (program_name, "swapon")) { if (stat(special, &st) < 0) { int errsv = errno; - fprintf (stderr, _("swapon: cannot stat %s: %s\n"), special, strerror (errsv)); + fprintf (stderr, _("swapon: cannot stat %s: %s\n"), + special, strerror (errsv)); return -1; } /* people generally dislike this warning - now it is printed only when `verbose' is set */ - if (verbose && (st.st_mode & 07077) != 0) { - fprintf(stderr, _("swapon: warning: %s has insecure permissions %04o, " - "0600 suggested\n"), special, st.st_mode & 07777); + if (verbose) { + int permMask = (S_ISBLK(st.st_mode) ? 07007 : 07077); + + if ((st.st_mode & permMask) != 0) { + fprintf(stderr, + _("swapon: warning: %s has insecure permissions %04o, " + "%04o suggested\n"), + special, st.st_mode & 07777, ~permMask & 0666); + } } /* test for holes by LBT */ diff --git a/mount/umount.c b/mount/umount.c index 1843e08e..92400875 100644 --- a/mount/umount.c +++ b/mount/umount.c @@ -39,6 +39,7 @@ #include "lomount.h" #include "loop.h" #include "fstab.h" +#include "env.h" #include "nls.h" #ifdef HAVE_NFS @@ -52,7 +53,7 @@ #include #endif -#if defined(MNT_FORCE) && !defined(__sparc__) && !defined(__arm__) && !defined(__mips__) +#if defined(MNT_FORCE) && !defined(__sparc__) && !defined(__arm__) /* Interesting ... it seems libc knows about MNT_FORCE and presumably about umount2 as well -- need not do anything */ #else /* MNT_FORCE */ @@ -100,6 +101,16 @@ int verbose = 0; /* True if ruid != euid. */ int suid = 0; +#ifdef USE_SPECIAL_UMOUNTPROG +/* unimplemented so far */ +static int +check_special_umountprog() { + /* find type from command line or /etc/mtab; + stat /sbin/umount.%s + if it exists, use it */ +} +#endif + #ifdef HAVE_NFS static int xdr_dir(XDR *xdrsp, char *dirp) { @@ -236,7 +247,6 @@ umount_one (const char *spec, const char *node, const char *type, nfs_umount_rpc_call(spec, opts); #endif - umnt_err = umnt_err2 = 0; if (force) { /* completely untested; @@ -383,7 +393,7 @@ umount_one_bw (const char *file, struct mntentchn *mc) { in any case it's important to umount mtab entries in reverse order to mount, e.g. /usr/spool before /usr. */ static int -umount_all (string_list types) { +umount_all (char *types) { struct mntentchn *mc, *hd; int errors = 0; @@ -426,152 +436,195 @@ usage (FILE *fp, int n) int mount_quiet = 0; -int -main (int argc, char *argv[]) -{ - int c; - int all = 0; - string_list types = NULL; - string_list options; - struct mntentchn *mc, *fs; - char *file; - int result = 0; - - setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); - - while ((c = getopt_long (argc, argv, "afhnrt:vV", - longopts, NULL)) != EOF) - switch (c) { - case 'a': /* umount everything */ - ++all; - break; - /* fall through? */ - case 'd': /* do losetup -d for unmounted loop devices */ - ++delloop; - break; - case 'f': /* force umount */ - ++force; - break; - case 'h': /* help */ - usage (stdout, 0); - break; - case 'n': /* do not write in /etc/mtab */ - ++nomtab; - break; - case 'r': /* remount read-only if umount fails */ - ++remount; - break; - case 'v': /* make noise */ - ++verbose; - break; - case 'V': /* version */ - printf ("umount: %s\n", version); - exit (0); - case 't': /* specify file system type */ - types = parse_list (optarg); - break; - case 0: - break; - case '?': - default: - usage (stderr, 1); - } - - if (getuid () != geteuid ()) - { - suid = 1; - if (all || types || nomtab || force) - die (2, _("umount: only root can do that")); - } - - argc -= optind; - argv += optind; - - if (all) { - if (types == NULL) - types = parse_list("noproc"); - result = umount_all (types); - } else if (argc < 1) { - usage (stderr, 2); - } else while (argc--) { - file = canonicalize (*argv); /* mtab paths are canonicalized */ - if (verbose > 1) - printf(_("Trying to umount %s\n"), file); - - mc = getmntfilesbackward (file, NULL); - if (!mc && verbose) - printf(_("Could not find %s in mtab\n"), file); - - if (suid) { - if (!mc) - die (2, _("umount: %s is not mounted (according to mtab)"), file); - if (getmntfilesbackward (file, mc)) - die (2, _("umount: it seems %s is mounted multiple times"), file); - - /* If fstab contains the two lines - /dev/sda1 /mnt/zip auto user,noauto 0 0 - /dev/sda4 /mnt/zip auto user,noauto 0 0 - then "mount /dev/sda4" followed by "umount /mnt/zip" - used to fail. So, we must not look for file, but for - the pair (spec,file) in fstab. */ - fs = getfsspecfile(mc->m.mnt_fsname, mc->m.mnt_dir); - if (!fs) { - if (!getfsspec (file) && !getfsfile (file)) - die (2, - _("umount: %s is not in the fstab (and you are not root)"), - file); - else - die (2, _("umount: %s mount disagrees with the fstab"), file); - } +/*=======================================================================*/ +/* string list stuff - no longer used by mount - will disappear entirely */ +typedef struct string_list { + char *hd; + struct string_list *tl; +} *string_list; - /* User mounting and unmounting is allowed only - if fstab contains the option `user' or `users' */ - /* The option `users' allows arbitrary users to mount - and unmount - this may be a security risk. */ - /* The option `user' only allows unmounting by the user - that mounted. */ - /* The option `owner' only allows (un)mounting by the owner. */ - /* A convenient side effect is that the user who mounted - is visible in mtab. */ - options = parse_list (fs->m.mnt_opts); - while (options) { - if (streq (car (options), "user") || - streq (car (options), "users") || - streq (car (options), "owner")) - break; - options = cdr (options); - } - if (!options) - die (2, _("umount: only root can unmount %s from %s"), - fs->m.mnt_fsname, fs->m.mnt_dir); - if (streq (car (options), "user") || - streq (car (options), "owner")) { - char *user = getusername(); - - options = parse_list (mc->m.mnt_opts); - while (options) { - char *co = car (options); - if (!strncmp(co, "user=", 5)) { - if (!user || !streq(co+5,user)) - die(2, _("umount: only %s can unmount %s from %s"), - co+5, fs->m.mnt_fsname, fs->m.mnt_dir); - break; - } - options = cdr (options); - } - } - } +#define car(p) ((p) -> hd) +#define cdr(p) ((p) -> tl) - if (mc) - result = umount_one_bw (file, mc); - else - result = umount_one (*argv, *argv, *argv, *argv, NULL); +static string_list +cons (char *a, const string_list b) { + string_list p; - argv++; + p = xmalloc (sizeof *p); + car (p) = a; + cdr (p) = b; + return p; +} + +/* Parse a list of strings like str[,str]... into a string list. */ +static string_list +parse_list (char *strings) { + string_list list; + char *s, *t; + + if (strings == NULL) + return NULL; + + /* strtok() destroys its argument, so we have to use a copy */ + s = xstrdup(strings); + + list = cons (strtok (s, ","), NULL); + + while ((t = strtok (NULL, ",")) != NULL) + list = cons (t, list); + + return list; +} +/*=======================================================================*/ + +static int +umount_file (char *arg) { + struct mntentchn *mc, *fs; + char *file; + string_list options; + + file = canonicalize (arg); /* mtab paths are canonicalized */ + if (verbose > 1) + printf(_("Trying to umount %s\n"), file); + + mc = getmntfilesbackward (file, NULL); + if (!mc && verbose) + printf(_("Could not find %s in mtab\n"), file); + + if (suid) { + if (!mc) + die (2, _("umount: %s is not mounted (according to mtab)"), file); + if (getmntfilesbackward (file, mc)) + die (2, _("umount: it seems %s is mounted multiple times"), file); + + /* If fstab contains the two lines + /dev/sda1 /mnt/zip auto user,noauto 0 0 + /dev/sda4 /mnt/zip auto user,noauto 0 0 + then "mount /dev/sda4" followed by "umount /mnt/zip" + used to fail. So, we must not look for file, but for + the pair (spec,file) in fstab. */ + fs = getfsspecfile(mc->m.mnt_fsname, mc->m.mnt_dir); + if (!fs) { + if (!getfsspec (file) && !getfsfile (file)) + die (2, + _("umount: %s is not in the fstab (and you are not root)"), + file); + else + die (2, _("umount: %s mount disagrees with the fstab"), file); + } + + /* User mounting and unmounting is allowed only + if fstab contains the option `user' or `users' */ + /* The option `users' allows arbitrary users to mount + and unmount - this may be a security risk. */ + /* The option `user' only allows unmounting by the user + that mounted. */ + /* The option `owner' only allows (un)mounting by the owner. */ + /* A convenient side effect is that the user who mounted + is visible in mtab. */ + options = parse_list (fs->m.mnt_opts); + while (options) { + if (streq (car (options), "user") || + streq (car (options), "users") || + streq (car (options), "owner")) + break; + options = cdr (options); + } + if (!options) + die (2, _("umount: only root can unmount %s from %s"), + fs->m.mnt_fsname, fs->m.mnt_dir); + if (streq (car (options), "user") || + streq (car (options), "owner")) { + char *user = getusername(); + + options = parse_list (mc->m.mnt_opts); + while (options) { + char *co = car (options); + if (!strncmp(co, "user=", 5)) { + if (!user || !streq(co+5,user)) + die(2, _("umount: only %s can unmount %s from %s"), + co+5, fs->m.mnt_fsname, fs->m.mnt_dir); + break; + } + options = cdr (options); + } + } + } + + if (mc) + return umount_one_bw (file, mc); + else + return umount_one (arg, arg, arg, arg, NULL); - } - exit (result); } +int +main (int argc, char *argv[]) { + int c; + int all = 0; + char *types = NULL; + int result = 0; + + sanitize_env(); + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + while ((c = getopt_long (argc, argv, "adfhnrt:vV", + longopts, NULL)) != EOF) + switch (c) { + case 'a': /* umount everything */ + ++all; + break; + /* fall through? */ + case 'd': /* do losetup -d for unmounted loop devices */ + ++delloop; + break; + case 'f': /* force umount */ + ++force; + break; + case 'h': /* help */ + usage (stdout, 0); + break; + case 'n': /* do not write in /etc/mtab */ + ++nomtab; + break; + case 'r': /* remount read-only if umount fails */ + ++remount; + break; + case 'v': /* make noise */ + ++verbose; + break; + case 'V': /* version */ + printf ("umount: %s\n", version); + exit (0); + case 't': /* specify file system type */ + types = optarg; + break; + case 0: + break; + case '?': + default: + usage (stderr, 1); + } + + if (getuid () != geteuid ()) { + suid = 1; + if (all || types || nomtab || force) + die (2, _("umount: only root can do that")); + } + + argc -= optind; + argv += optind; + + if (all) { + if (types == NULL) + types = "noproc"; + result = umount_all (types); + } else if (argc < 1) { + usage (stderr, 2); + } else while (argc--) { + result += umount_file(*argv++); + } + exit (result); /* nonzero on at least one failure */ +} diff --git a/po/POTFILES.in b/po/POTFILES.in index 3e9c9618..31634f08 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -20,7 +20,7 @@ fdisk/llseek.c fdisk/partname.c fdisk/sfdisk.c games/banner.c -getopt-1.1.0a/getopt.c +getopt-1.1.2/getopt.c hwclock/clock-ppc.c hwclock/cmos.c hwclock/hwclock.c diff --git a/po/cat-id-tbl.c b/po/cat-id-tbl.c index 1ce59696..a4e5a8fb 100644 --- a/po/cat-id-tbl.c +++ b/po/cat-id-tbl.c @@ -43,81 +43,83 @@ Continuing ... ", 21}, {"check aborted.\n", 32}, {"Zone nr < FIRSTZONE in file `", 33}, {"Zone nr >= ZONES in file `", 34}, - {"Remove block", 35}, - {"Read error: unable to seek to block in file '", 36}, - {"Read error: bad block in file '", 37}, + {"'.", 35}, + {"Remove block", 36}, + {"Read error: unable to seek to block in file '", 37}, + {"'\n", 38}, + {"Read error: bad block in file '", 39}, {"\ Internal error: trying to write bad block\n\ -Write request ignored\n", 38}, - {"seek failed in write_block", 39}, - {"Write error: bad block in file '", 40}, - {"seek failed in write_super_block", 41}, - {"unable to write super-block", 42}, - {"Unable to write inode map", 43}, - {"Unable to write zone map", 44}, - {"Unable to write inodes", 45}, - {"seek failed", 46}, - {"unable to read super block", 47}, - {"bad magic number in super-block", 48}, - {"Only 1k blocks/zones supported", 49}, - {"bad s_imap_blocks field in super-block", 50}, - {"bad s_zmap_blocks field in super-block", 51}, - {"Unable to allocate buffer for inode map", 52}, - {"Unable to allocate buffer for inodes", 53}, - {"Unable to allocate buffer for inode count", 54}, - {"Unable to allocate buffer for zone count", 55}, - {"Unable to read inode map", 56}, - {"Unable to read zone map", 57}, - {"Unable to read inodes", 58}, - {"Warning: Firstzone != Norm_firstzone\n", 59}, - {"%ld inodes\n", 60}, - {"%ld blocks\n", 61}, - {"Firstdatazone=%ld (%ld)\n", 62}, - {"Zonesize=%d\n", 63}, - {"Maxsize=%ld\n", 64}, - {"Filesystem state=%d\n", 65}, +Write request ignored\n", 40}, + {"seek failed in write_block", 41}, + {"Write error: bad block in file '", 42}, + {"seek failed in write_super_block", 43}, + {"unable to write super-block", 44}, + {"Unable to write inode map", 45}, + {"Unable to write zone map", 46}, + {"Unable to write inodes", 47}, + {"seek failed", 48}, + {"unable to read super block", 49}, + {"bad magic number in super-block", 50}, + {"Only 1k blocks/zones supported", 51}, + {"bad s_imap_blocks field in super-block", 52}, + {"bad s_zmap_blocks field in super-block", 53}, + {"Unable to allocate buffer for inode map", 54}, + {"Unable to allocate buffer for inodes", 55}, + {"Unable to allocate buffer for inode count", 56}, + {"Unable to allocate buffer for zone count", 57}, + {"Unable to read inode map", 58}, + {"Unable to read zone map", 59}, + {"Unable to read inodes", 60}, + {"Warning: Firstzone != Norm_firstzone\n", 61}, + {"%ld inodes\n", 62}, + {"%ld blocks\n", 63}, + {"Firstdatazone=%ld (%ld)\n", 64}, + {"Zonesize=%d\n", 65}, + {"Maxsize=%ld\n", 66}, + {"Filesystem state=%d\n", 67}, {"\ namelen=%d\n\ -\n", 66}, - {"Inode %d marked not used, but used for file '", 67}, - {"Mark in use", 68}, - {" has mode %05o\n", 69}, - {"Warning: inode count too big.\n", 70}, - {"root inode isn't a directory", 71}, - {"Block has been used before. Now in file `", 72}, - {"Clear", 73}, - {"Block %d in file `", 74}, - {"' is marked not in use.", 75}, - {"Correct", 76}, - {" contains a bad inode number for file '", 77}, - {" Remove", 78}, - {": bad directory: '.' isn't first\n", 79}, - {": bad directory: '..' isn't second\n", 80}, - {"internal error", 81}, - {": bad directory: size<32", 82}, - {": bad directory: size < 32", 83}, - {"seek failed in bad_zone", 84}, - {"Inode %d mode not cleared.", 85}, - {"Inode %d not used, marked used in the bitmap.", 86}, - {"Inode %d used, marked unused in the bitmap.", 87}, - {"Inode %d (mode = %07o), i_nlinks=%d, counted=%d.", 88}, - {"Set i_nlinks to count", 89}, - {"Zone %d: marked in use, no file uses it.", 90}, - {"Unmark", 91}, - {"Zone %d: %sin use, counted=%d\n", 92}, - {"not ", 93}, - {"Set", 94}, - {"bad inode size", 95}, - {"bad v2 inode size", 96}, - {"need terminal for interactive repairs", 97}, - {"unable to open '%s'", 98}, - {"%s is clean, no check.\n", 99}, - {"Forcing filesystem check on %s.\n", 100}, - {"Filesystem on %s is dirty, needs checking.\n", 101}, +\n", 68}, + {"Inode %d marked not used, but used for file '", 69}, + {"Mark in use", 70}, + {" has mode %05o\n", 71}, + {"Warning: inode count too big.\n", 72}, + {"root inode isn't a directory", 73}, + {"Block has been used before. Now in file `", 74}, + {"Clear", 75}, + {"Block %d in file `", 76}, + {"' is marked not in use.", 77}, + {"Correct", 78}, + {"The directory '", 79}, + {"' contains a bad inode number for file '%.*s'.", 80}, + {" Remove", 81}, + {": bad directory: '.' isn't first\n", 82}, + {": bad directory: '..' isn't second\n", 83}, + {"internal error", 84}, + {": bad directory: size < 32", 85}, + {"seek failed in bad_zone", 86}, + {"Inode %d mode not cleared.", 87}, + {"Inode %d not used, marked used in the bitmap.", 88}, + {"Inode %d used, marked unused in the bitmap.", 89}, + {"Inode %d (mode = %07o), i_nlinks=%d, counted=%d.", 90}, + {"Set i_nlinks to count", 91}, + {"Zone %d: marked in use, no file uses it.", 92}, + {"Unmark", 93}, + {"Zone %d: %sin use, counted=%d\n", 94}, + {"not ", 95}, + {"Set", 96}, + {"bad inode size", 97}, + {"bad v2 inode size", 98}, + {"need terminal for interactive repairs", 99}, + {"unable to open '%s'", 100}, + {"%s is clean, no check.\n", 101}, + {"Forcing filesystem check on %s.\n", 102}, + {"Filesystem on %s is dirty, needs checking.\n", 103}, {"\ \n\ -%6ld inodes used (%ld%%)\n", 102}, - {"%6ld zones used (%ld%%)\n", 103}, +%6ld inodes used (%ld%%)\n", 104}, + {"%6ld zones used (%ld%%)\n", 105}, {"\ \n\ %6d regular files\n\ @@ -127,306 +129,307 @@ namelen=%d\n\ %6d links\n\ %6d symbolic links\n\ ------\n\ -%6d files\n", 104}, +%6d files\n", 106}, {"\ ----------------------------\n\ FILE SYSTEM HAS BEEN CHANGED\n\ -----------------------------\n", 105}, - {"%s: failed to open: %s\n", 106}, - {"%s: seek error on %s\n", 107}, - {"%s: read error on %s\n", 108}, - {"sector count: %d, sector size: %d\n", 109}, - {"%s: option parse error\n", 110}, - {"Usage: %s [-x] [-d ] iso9660-image\n", 111}, +----------------------------\n", 107}, + {"%s: failed to open: %s\n", 108}, + {"%s: seek error on %s\n", 109}, + {"%s: read error on %s\n", 110}, + {"sector count: %d, sector size: %d\n", 111}, + {"%s: option parse error\n", 112}, + {"Usage: %s [-x] [-d ] iso9660-image\n", 113}, {"\ Usage: %s [-v] [-N nr-of-inodes] [-V volume-name]\n\ - [-F fsname] device [block-count]\n", 112}, - {"volume name too long", 113}, - {"fsname name too long", 114}, - {"cannot stat device %s", 115}, - {"%s is not a block special device", 116}, - {"cannot open %s", 117}, - {"cannot get size of %s", 118}, - {"blocks argument too large, max is %lu", 119}, - {"too many inodes - max is 512", 120}, - {"not enough space, need at least %lu blocks", 121}, - {"Device: %s\n", 122}, - {"Volume: <%-6s>\n", 123}, - {"FSname: <%-6s>\n", 124}, - {"BlockSize: %d\n", 125}, - {"Inodes: %d (in 1 block)\n", 126}, - {"Inodes: %d (in %ld blocks)\n", 127}, - {"Blocks: %ld\n", 128}, - {"Inode end: %d, Data end: %d\n", 129}, - {"error writing superblock", 130}, - {"error writing root inode", 131}, - {"error writing inode", 132}, - {"seek error", 133}, - {"error writing . entry", 134}, - {"error writing .. entry", 135}, - {"error closing %s", 136}, - {"Usage: mkfs [-V] [-t fstype] [fs-options] device [size]\n", 137}, - {"%s: Out of memory!\n", 138}, - {"mkfs version %s (%s)\n", 139}, - {"Usage: %s [-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]\n", 140}, - {"%s is mounted; will not make a filesystem here!", 141}, - {"seek to boot block failed in write_tables", 142}, - {"unable to clear boot sector", 143}, - {"seek failed in write_tables", 144}, - {"unable to write inode map", 145}, - {"unable to write zone map", 146}, - {"unable to write inodes", 147}, - {"write failed in write_block", 148}, - {"too many bad blocks", 149}, - {"not enough good blocks", 150}, - {"unable to allocate buffers for maps", 151}, - {"unable to allocate buffer for inodes", 152}, + [-F fsname] device [block-count]\n", 114}, + {"volume name too long", 115}, + {"fsname name too long", 116}, + {"cannot stat device %s", 117}, + {"%s is not a block special device", 118}, + {"cannot open %s", 119}, + {"cannot get size of %s", 120}, + {"blocks argument too large, max is %lu", 121}, + {"too many inodes - max is 512", 122}, + {"not enough space, need at least %lu blocks", 123}, + {"Device: %s\n", 124}, + {"Volume: <%-6s>\n", 125}, + {"FSname: <%-6s>\n", 126}, + {"BlockSize: %d\n", 127}, + {"Inodes: %d (in 1 block)\n", 128}, + {"Inodes: %d (in %ld blocks)\n", 129}, + {"Blocks: %ld\n", 130}, + {"Inode end: %d, Data end: %d\n", 131}, + {"error writing superblock", 132}, + {"error writing root inode", 133}, + {"error writing inode", 134}, + {"seek error", 135}, + {"error writing . entry", 136}, + {"error writing .. entry", 137}, + {"error closing %s", 138}, + {"Usage: mkfs [-V] [-t fstype] [fs-options] device [size]\n", 139}, + {"%s: Out of memory!\n", 140}, + {"mkfs version %s (%s)\n", 141}, + {"Usage: %s [-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]\n", 142}, + {"%s is mounted; will not make a filesystem here!", 143}, + {"seek to boot block failed in write_tables", 144}, + {"unable to clear boot sector", 145}, + {"seek failed in write_tables", 146}, + {"unable to write inode map", 147}, + {"unable to write zone map", 148}, + {"unable to write inodes", 149}, + {"write failed in write_block", 150}, + {"too many bad blocks", 151}, + {"not enough good blocks", 152}, + {"unable to allocate buffers for maps", 153}, + {"unable to allocate buffer for inodes", 154}, {"\ Maxsize=%ld\n\ -\n", 153}, - {"seek failed during testing of blocks", 154}, - {"Weird values in do_check: probably bugs\n", 155}, - {"seek failed in check_blocks", 156}, - {"bad blocks before data-area: cannot make fs", 157}, - {"%d bad blocks\n", 158}, - {"one bad block\n", 159}, - {"can't open file of bad blocks", 160}, - {"%s: not compiled with minix v2 support\n", 161}, - {"strtol error: number of blocks not specified", 162}, - {"unable to open %s", 163}, - {"unable to stat %s", 164}, - {"will not try to make filesystem on '%s'", 165}, - {"Bad user-specified page size %d\n", 166}, - {"Using user-specified page size %d, instead of the system values %d/%d\n", 167}, - {"Assuming pages of size %d (not %d)\n", 168}, - {"Usage: %s [-c] [-v0|-v1] [-pPAGESZ] /dev/name [blocks]\n", 169}, - {"too many bad pages", 170}, - {"Out of memory", 171}, - {"one bad page\n", 172}, - {"%d bad pages\n", 173}, - {"%s: error: Nowhere to set up swap on?\n", 174}, - {"%s: error: size %ld is larger than device size %d\n", 175}, - {"%s: error: unknown version %d\n", 176}, - {"%s: error: swap area needs to be at least %ldkB\n", 177}, - {"%s: warning: truncating swap area to %ldkB\n", 178}, - {"Will not try to make swapdevice on '%s'", 179}, - {"fatal: first page unreadable", 180}, +\n", 155}, + {"seek failed during testing of blocks", 156}, + {"Weird values in do_check: probably bugs\n", 157}, + {"seek failed in check_blocks", 158}, + {"bad blocks before data-area: cannot make fs", 159}, + {"%d bad blocks\n", 160}, + {"one bad block\n", 161}, + {"can't open file of bad blocks", 162}, + {"%s: not compiled with minix v2 support\n", 163}, + {"strtol error: number of blocks not specified", 164}, + {"unable to open %s", 165}, + {"unable to stat %s", 166}, + {"will not try to make filesystem on '%s'", 167}, + {"Bad user-specified page size %d\n", 168}, + {"Using user-specified page size %d, instead of the system values %d/%d\n", 169}, + {"Assuming pages of size %d (not %d)\n", 170}, + {"Usage: %s [-c] [-v0|-v1] [-pPAGESZ] /dev/name [blocks]\n", 171}, + {"too many bad pages", 172}, + {"Out of memory", 173}, + {"one bad page\n", 174}, + {"%d bad pages\n", 175}, + {"%s: error: Nowhere to set up swap on?\n", 176}, + {"%s: error: size %ld is larger than device size %d\n", 177}, + {"%s: error: unknown version %d\n", 178}, + {"%s: error: swap area needs to be at least %ldkB\n", 179}, + {"%s: warning: truncating swap area to %ldkB\n", 180}, + {"Will not try to make swapdevice on '%s'", 181}, + {"fatal: first page unreadable", 182}, {"\ %s: Device '%s' contains a valid Sun disklabel.\n\ This probably means creating v0 swap would destroy your partition table\n\ No swap created. If you really want to create swap v0 on that device, use\n\ -the -f option to force it.\n", 181}, - {"Unable to set up swap-space: unreadable", 182}, - {"Setting up swapspace version %d, size = %ld bytes\n", 183}, - {"unable to rewind swap-device", 184}, - {"unable to write signature page", 185}, - {"fsync failed", 186}, - {"Invalid number: %s\n", 187}, - {"Syntax error: '%s'\n", 188}, - {"No such parameter set: '%s'\n", 189}, - {"usage: %s [ -p ] dev name\n", 190}, - {"\ - %s [ -p ] dev size sect heads tracks stretch gap rate spec1 fmt_gap\n", 191}, - {" %s [ -c | -y | -n | -d ] dev\n", 192}, - {" %s [ -c | -y | -n ] dev\n", 193}, - {"Unusable", 194}, - {"Free Space", 195}, - {"Linux ext2", 196}, - {"Linux", 197}, - {"OS/2 HPFS", 198}, - {"OS/2 IFS", 199}, - {"NTFS", 200}, - {"Disk has been changed.\n", 201}, - {"Reboot the system to ensure the partition table is correctly updated.\n", 202}, +the -f option to force it.\n", 183}, + {"Unable to set up swap-space: unreadable", 184}, + {"Setting up swapspace version %d, size = %ld bytes\n", 185}, + {"unable to rewind swap-device", 186}, + {"unable to write signature page", 187}, + {"fsync failed", 188}, + {"Invalid number: %s\n", 189}, + {"Syntax error: '%s'\n", 190}, + {"No such parameter set: '%s'\n", 191}, + {"usage: %s [ -p ] dev name\n", 192}, + {"\ + %s [ -p ] dev size sect heads tracks stretch gap rate spec1 fmt_gap\n", 193}, + {" %s [ -c | -y | -n | -d ] dev\n", 194}, + {" %s [ -c | -y | -n ] dev\n", 195}, + {"Unusable", 196}, + {"Free Space", 197}, + {"Linux ext2", 198}, + {"Linux", 199}, + {"OS/2 HPFS", 200}, + {"OS/2 IFS", 201}, + {"NTFS", 202}, + {"Disk has been changed.\n", 203}, + {"Reboot the system to ensure the partition table is correctly updated.\n", 204}, {"\ \n\ WARNING: If you have created or modified any\n\ DOS 6.x partitions, please see the cfdisk manual\n\ -page for additional information.\n", 203}, - {"FATAL ERROR", 204}, - {"Press any key to exit cfdisk", 205}, - {"Cannot seek on disk drive", 206}, - {"Cannot read disk drive", 207}, - {"Cannot write disk drive", 208}, - {"Too many partitions", 209}, - {"Partition begins before sector 0", 210}, - {"Partition ends before sector 0", 211}, - {"Partition begins after end-of-disk", 212}, - {"Partition ends after end-of-disk", 213}, - {"logical partitions not in disk order", 214}, - {"logical partitions overlap", 215}, - {"enlarged logical partitions overlap", 216}, - {"\ -!!!! Internal error creating logical drive with no extended partition !!!!", 217}, - {"\ -Cannot create logical drive here -- would create two extended partitions", 218}, - {"Menu item too long. Menu may look odd.", 219}, - {"Menu without direction. Defaulting horizontal.", 220}, - {"Illegal key", 221}, - {"Press a key to continue", 222}, - {"Primary", 223}, - {"Create a new primary partition", 224}, - {"Logical", 225}, - {"Create a new logical partition", 226}, - {"Cancel", 227}, - {"Don't create a partition", 228}, - {"!!! Internal error !!!", 229}, - {"Size (in MB): ", 230}, - {"Beginning", 231}, - {"Add partition at beginning of free space", 232}, - {"End", 233}, - {"Add partition at end of free space", 234}, - {"No room to create the extended partition", 235}, - {"Bad signature on partition table", 236}, - {"You specified more cylinders than fit on disk", 237}, - {"Cannot open disk drive", 238}, - {"Opened disk read-only - you have no permission to write", 239}, - {"Cannot get disk size", 240}, - {"Bad primary partition", 241}, - {"Bad logical partition", 242}, - {"Warning!! This may destroy data on your disk!", 243}, - {"Are you sure you want write the partition table to disk? (yes or no): ", 244}, - {"no", 245}, - {"Did not write partition table to disk", 246}, - {"yes", 247}, - {"Please enter `yes' or `no'", 248}, - {"Writing partition table to disk...", 249}, - {"Wrote partition table to disk", 250}, - {"\ -Wrote partition table, but re-read table failed. Reboot to update table.", 251}, - {"No primary partitions are marked bootable. DOS MBR cannot boot this.", 252}, - {"\ -More than one primary partition is marked bootable. DOS MBR cannot boot this.", 253}, - {"Enter filename or press RETURN to display on screen: ", 254}, - {"Cannot open file '%s'", 255}, - {"Disk Drive: %s\n", 256}, - {"Sector 0:\n", 257}, - {"Sector %d:\n", 258}, - {" None ", 259}, - {" Pri/Log", 260}, - {" Primary", 261}, - {" Logical", 262}, - {"Unknown", 263}, - {"Boot (%02X)", 264}, - {"Unknown (%02X)", 265}, - {"None (%02X)", 266}, - {"Partition Table for %s\n", 267}, - {" First Last\n", 268}, - {"\ - # Type Sector Sector Offset Length Filesystem Type (ID) Flags\n", 269}, +page for additional information.\n", 205}, + {"FATAL ERROR", 206}, + {"Press any key to exit cfdisk", 207}, + {"Cannot seek on disk drive", 208}, + {"Cannot read disk drive", 209}, + {"Cannot write disk drive", 210}, + {"Too many partitions", 211}, + {"Partition begins before sector 0", 212}, + {"Partition ends before sector 0", 213}, + {"Partition begins after end-of-disk", 214}, + {"Partition ends after end-of-disk", 215}, + {"logical partitions not in disk order", 216}, + {"logical partitions overlap", 217}, + {"enlarged logical partitions overlap", 218}, + {"\ +!!!! Internal error creating logical drive with no extended partition !!!!", 219}, + {"\ +Cannot create logical drive here -- would create two extended partitions", 220}, + {"Menu item too long. Menu may look odd.", 221}, + {"Menu without direction. Defaulting horizontal.", 222}, + {"Illegal key", 223}, + {"Press a key to continue", 224}, + {"Primary", 225}, + {"Create a new primary partition", 226}, + {"Logical", 227}, + {"Create a new logical partition", 228}, + {"Cancel", 229}, + {"Don't create a partition", 230}, + {"!!! Internal error !!!", 231}, + {"Size (in MB): ", 232}, + {"Beginning", 233}, + {"Add partition at beginning of free space", 234}, + {"End", 235}, + {"Add partition at end of free space", 236}, + {"No room to create the extended partition", 237}, + {"No partition table or unknown signature on partition table", 238}, + {"Do you wish to start with a zero table [y/N] ?", 239}, + {"You specified more cylinders than fit on disk", 240}, + {"Cannot open disk drive", 241}, + {"Opened disk read-only - you have no permission to write", 242}, + {"Cannot get disk size", 243}, + {"Bad primary partition", 244}, + {"Bad logical partition", 245}, + {"Warning!! This may destroy data on your disk!", 246}, + {"Are you sure you want write the partition table to disk? (yes or no): ", 247}, + {"no", 248}, + {"Did not write partition table to disk", 249}, + {"yes", 250}, + {"Please enter `yes' or `no'", 251}, + {"Writing partition table to disk...", 252}, + {"Wrote partition table to disk", 253}, + {"\ +Wrote partition table, but re-read table failed. Reboot to update table.", 254}, + {"No primary partitions are marked bootable. DOS MBR cannot boot this.", 255}, + {"\ +More than one primary partition is marked bootable. DOS MBR cannot boot this.", 256}, + {"Enter filename or press RETURN to display on screen: ", 257}, + {"Cannot open file '%s'", 258}, + {"Disk Drive: %s\n", 259}, + {"Sector 0:\n", 260}, + {"Sector %d:\n", 261}, + {" None ", 262}, + {" Pri/Log", 263}, + {" Primary", 264}, + {" Logical", 265}, + {"Unknown", 266}, + {"Boot (%02X)", 267}, + {"Unknown (%02X)", 268}, + {"None (%02X)", 269}, + {"Partition Table for %s\n", 270}, + {" First Last\n", 271}, + {"\ + # Type Sector Sector Offset Length Filesystem Type (ID) Flags\n", 272}, {"\ -- ------- -------- --------- ------ --------- ---------------------- \ ----------\n", 270}, - {" ---Starting--- ----Ending---- Start Number of\n", 271}, - {" # Flags Head Sect Cyl ID Head Sect Cyl Sector Sectors\n", 272}, - {"-- ----- ---- ---- ---- ---- ---- ---- ---- -------- ---------\n", 273}, - {"Raw", 274}, - {"Print the table using raw data format", 275}, - {"Sectors", 276}, - {"Print the table ordered by sectors", 277}, - {"Table", 278}, - {"Just print the partition table", 279}, - {"Don't print the table", 280}, - {"Help Screen for cfdisk", 281}, - {"This is cfdisk, a curses based disk partitioning program, which", 282}, - {"allows you to create, delete and modify partitions on your hard", 283}, - {"disk drive.", 284}, - {"Copyright (C) 1994-1999 Kevin E. Martin & aeb", 285}, - {"Command Meaning", 286}, - {"------- -------", 287}, - {" b Toggle bootable flag of the current partition", 288}, - {" d Delete the current partition", 289}, - {" g Change cylinders, heads, sectors-per-track parameters", 290}, - {" WARNING: This option should only be used by people who", 291}, - {" know what they are doing.", 292}, - {" h Print this screen", 293}, - {" m Maximize disk usage of the current partition", 294}, - {" Note: This may make the partition incompatible with", 295}, - {" DOS, OS/2, ...", 296}, - {" n Create new partition from free space", 297}, - {" p Print partition table to the screen or to a file", 298}, - {" There are several different formats for the partition", 299}, - {" that you can choose from:", 300}, - {" r - Raw data (exactly what would be written to disk)", 301}, - {" s - Table ordered by sectors", 302}, - {" t - Table in raw format", 303}, - {" q Quit program without writing partition table", 304}, - {" t Change the filesystem type", 305}, - {" u Change units of the partition size display", 306}, - {" Rotates through MB, sectors and cylinders", 307}, - {" W Write partition table to disk (must enter upper case W)", 308}, - {" Since this might destroy data on the disk, you must", 309}, - {" either confirm or deny the write by entering `yes' or", 310}, - {" `no'", 311}, - {"Up Arrow Move cursor to the previous partition", 312}, - {"Down Arrow Move cursor to the next partition", 313}, - {"CTRL-L Redraws the screen", 314}, - {" ? Print this screen", 315}, - {"Note: All of the commands can be entered with either upper or lower", 316}, - {"case letters (except for Writes).", 317}, - {"Cylinders", 318}, - {"Change cylinder geometry", 319}, - {"Heads", 320}, - {"Change head geometry", 321}, - {"Change sector geometry", 322}, - {"Done", 323}, - {"Done with changing geometry", 324}, - {"Enter the number of cylinders: ", 325}, - {"Illegal cylinders value", 326}, - {"Enter the number of heads: ", 327}, - {"Illegal heads value", 328}, - {"Enter the number of sectors per track: ", 329}, - {"Illegal sectors value", 330}, - {"Enter filesystem type: ", 331}, - {"Cannot change FS Type to empty", 332}, - {"Cannot change FS Type to extended", 333}, - {"Boot", 334}, - {"Unk(%02X)", 335}, - {", NC", 336}, - {"NC", 337}, - {"Pri/Log", 338}, - {"Disk Drive: %s", 339}, - {"Size: %lld bytes", 340}, - {"Heads: %d Sectors per Track: %d Cylinders: %d", 341}, - {"Name", 342}, - {"Flags", 343}, - {"Part Type", 344}, - {"FS Type", 345}, - {"[Label]", 346}, - {" Sectors", 347}, - {"Size (MB)", 348}, - {"Size (GB)", 349}, - {"Bootable", 350}, - {"Toggle bootable flag of the current partition", 351}, - {"Delete", 352}, - {"Delete the current partition", 353}, - {"Geometry", 354}, - {"Change disk geometry (experts only)", 355}, - {"Help", 356}, - {"Print help screen", 357}, - {"Maximize", 358}, - {"Maximize disk usage of the current partition (experts only)", 359}, - {"New", 360}, - {"Create new partition from free space", 361}, - {"Print", 362}, - {"Print partition table to the screen or to a file", 363}, - {"Quit", 364}, - {"Quit program without writing partition table", 365}, - {"Type", 366}, - {"Change the filesystem type (DOS, Linux, OS/2 and so on)", 367}, - {"Units", 368}, - {"Change units of the partition size display (MB, sect, cyl)", 369}, - {"Write", 370}, - {"Write partition table to disk (this might destroy data)", 371}, - {"Cannot make this partition bootable", 372}, - {"Cannot delete an empty partition", 373}, - {"Cannot maximize this partition", 374}, - {"This partition is unusable", 375}, - {"This partition is already in use", 376}, - {"Cannot change the type of an empty partition", 377}, - {"No more partitions", 378}, - {"Illegal command", 379}, - {"Copyright (C) 1994-2000 Kevin E. Martin & aeb\n", 380}, +---------\n", 273}, + {" ---Starting--- ----Ending---- Start Number of\n", 274}, + {" # Flags Head Sect Cyl ID Head Sect Cyl Sector Sectors\n", 275}, + {"-- ----- ---- ---- ---- ---- ---- ---- ---- -------- ---------\n", 276}, + {"Raw", 277}, + {"Print the table using raw data format", 278}, + {"Sectors", 279}, + {"Print the table ordered by sectors", 280}, + {"Table", 281}, + {"Just print the partition table", 282}, + {"Don't print the table", 283}, + {"Help Screen for cfdisk", 284}, + {"This is cfdisk, a curses based disk partitioning program, which", 285}, + {"allows you to create, delete and modify partitions on your hard", 286}, + {"disk drive.", 287}, + {"Copyright (C) 1994-1999 Kevin E. Martin & aeb", 288}, + {"Command Meaning", 289}, + {"------- -------", 290}, + {" b Toggle bootable flag of the current partition", 291}, + {" d Delete the current partition", 292}, + {" g Change cylinders, heads, sectors-per-track parameters", 293}, + {" WARNING: This option should only be used by people who", 294}, + {" know what they are doing.", 295}, + {" h Print this screen", 296}, + {" m Maximize disk usage of the current partition", 297}, + {" Note: This may make the partition incompatible with", 298}, + {" DOS, OS/2, ...", 299}, + {" n Create new partition from free space", 300}, + {" p Print partition table to the screen or to a file", 301}, + {" There are several different formats for the partition", 302}, + {" that you can choose from:", 303}, + {" r - Raw data (exactly what would be written to disk)", 304}, + {" s - Table ordered by sectors", 305}, + {" t - Table in raw format", 306}, + {" q Quit program without writing partition table", 307}, + {" t Change the filesystem type", 308}, + {" u Change units of the partition size display", 309}, + {" Rotates through MB, sectors and cylinders", 310}, + {" W Write partition table to disk (must enter upper case W)", 311}, + {" Since this might destroy data on the disk, you must", 312}, + {" either confirm or deny the write by entering `yes' or", 313}, + {" `no'", 314}, + {"Up Arrow Move cursor to the previous partition", 315}, + {"Down Arrow Move cursor to the next partition", 316}, + {"CTRL-L Redraws the screen", 317}, + {" ? Print this screen", 318}, + {"Note: All of the commands can be entered with either upper or lower", 319}, + {"case letters (except for Writes).", 320}, + {"Cylinders", 321}, + {"Change cylinder geometry", 322}, + {"Heads", 323}, + {"Change head geometry", 324}, + {"Change sector geometry", 325}, + {"Done", 326}, + {"Done with changing geometry", 327}, + {"Enter the number of cylinders: ", 328}, + {"Illegal cylinders value", 329}, + {"Enter the number of heads: ", 330}, + {"Illegal heads value", 331}, + {"Enter the number of sectors per track: ", 332}, + {"Illegal sectors value", 333}, + {"Enter filesystem type: ", 334}, + {"Cannot change FS Type to empty", 335}, + {"Cannot change FS Type to extended", 336}, + {"Boot", 337}, + {"Unk(%02X)", 338}, + {", NC", 339}, + {"NC", 340}, + {"Pri/Log", 341}, + {"Disk Drive: %s", 342}, + {"Size: %lld bytes", 343}, + {"Heads: %d Sectors per Track: %d Cylinders: %d", 344}, + {"Name", 345}, + {"Flags", 346}, + {"Part Type", 347}, + {"FS Type", 348}, + {"[Label]", 349}, + {" Sectors", 350}, + {"Size (MB)", 351}, + {"Size (GB)", 352}, + {"Bootable", 353}, + {"Toggle bootable flag of the current partition", 354}, + {"Delete", 355}, + {"Delete the current partition", 356}, + {"Geometry", 357}, + {"Change disk geometry (experts only)", 358}, + {"Help", 359}, + {"Print help screen", 360}, + {"Maximize", 361}, + {"Maximize disk usage of the current partition (experts only)", 362}, + {"New", 363}, + {"Create new partition from free space", 364}, + {"Print", 365}, + {"Print partition table to the screen or to a file", 366}, + {"Quit", 367}, + {"Quit program without writing partition table", 368}, + {"Type", 369}, + {"Change the filesystem type (DOS, Linux, OS/2 and so on)", 370}, + {"Units", 371}, + {"Change units of the partition size display (MB, sect, cyl)", 372}, + {"Write", 373}, + {"Write partition table to disk (this might destroy data)", 374}, + {"Cannot make this partition bootable", 375}, + {"Cannot delete an empty partition", 376}, + {"Cannot maximize this partition", 377}, + {"This partition is unusable", 378}, + {"This partition is already in use", 379}, + {"Cannot change the type of an empty partition", 380}, + {"No more partitions", 381}, + {"Illegal command", 382}, + {"Copyright (C) 1994-2000 Kevin E. Martin & aeb\n", 383}, {"\ \n\ Usage:\n\ @@ -442,7 +445,7 @@ Options:\n\ -z: Start with a zero partition table, instead of reading the pt from disk;\n\ -c C -h H -s S: Override the kernel's idea of the number of cylinders,\n\ the number of heads and the number of sectors/track.\n\ -\n", 381}, +\n", 384}, {"\ Usage: fdisk [-b SSZ] [-u] DISK Change partition table\n\ fdisk -l [-b SSZ] [-u] DISK List partition table(s)\n\ @@ -451,65 +454,65 @@ Usage: fdisk [-b SSZ] [-u] DISK Change partition table\n\ Here DISK is something like /dev/hdb or /dev/sda\n\ and PARTITION is something like /dev/hda7\n\ -u: give Start and End in sector (instead of cylinder) units\n\ --b 2048: (for certain MO drives) use 2048-byte sectors\n", 382}, +-b 2048: (for certain MO drives) use 2048-byte sectors\n", 385}, {"\ Usage: fdisk [-l] [-b SSZ] [-u] device\n\ E.g.: fdisk /dev/hda (for the first IDE disk)\n\ or: fdisk /dev/sdc (for the third SCSI disk)\n\ or: fdisk /dev/eda (for the first PS/2 ESDI drive)\n\ or: fdisk /dev/rd/c0d0 or: fdisk /dev/ida/c0d0 (for RAID devices)\n\ - ...\n", 383}, - {"Unable to open %s\n", 384}, - {"Unable to read %s\n", 385}, - {"Unable to seek on %s\n", 386}, - {"Unable to write %s\n", 387}, - {"BLKGETSIZE ioctl failed on %s\n", 388}, - {"Unable to allocate any more memory\n", 389}, - {"Fatal error\n", 390}, - {"Command action", 391}, - {" a toggle a read only flag", 392}, - {" b edit bsd disklabel", 393}, - {" c toggle the mountable flag", 394}, - {" d delete a partition", 395}, - {" l list known partition types", 396}, - {" m print this menu", 397}, - {" n add a new partition", 398}, - {" o create a new empty DOS partition table", 399}, - {" p print the partition table", 400}, - {" q quit without saving changes", 401}, - {" s create a new empty Sun disklabel", 402}, - {" t change a partition's system id", 403}, - {" u change display/entry units", 404}, - {" v verify the partition table", 405}, - {" w write table to disk and exit", 406}, - {" x extra functionality (experts only)", 407}, - {" a select bootable partition", 408}, - {" b edit bootfile entry", 409}, - {" c select sgi swap partition", 410}, - {" a toggle a bootable flag", 411}, - {" c toggle the dos compatibility flag", 412}, - {" a change number of alternate cylinders", 413}, - {" c change number of cylinders", 414}, - {" d print the raw data in the partition table", 415}, - {" e change number of extra sectors per cylinder", 416}, - {" h change number of heads", 417}, - {" i change interleave factor", 418}, - {" o change rotation speed (rpm)", 419}, - {" r return to main menu", 420}, - {" s change number of sectors/track", 421}, - {" y change number of physical cylinders", 422}, - {" b move beginning of data in a partition", 423}, - {" e list extended partitions", 424}, - {" g create an IRIX partition table", 425}, - {" f fix partition order", 426}, - {"You must set", 427}, - {"heads", 428}, - {"sectors", 429}, - {"cylinders", 430}, + ...\n", 386}, + {"Unable to open %s\n", 387}, + {"Unable to read %s\n", 388}, + {"Unable to seek on %s\n", 389}, + {"Unable to write %s\n", 390}, + {"BLKGETSIZE ioctl failed on %s\n", 391}, + {"Unable to allocate any more memory\n", 392}, + {"Fatal error\n", 393}, + {"Command action", 394}, + {" a toggle a read only flag", 395}, + {" b edit bsd disklabel", 396}, + {" c toggle the mountable flag", 397}, + {" d delete a partition", 398}, + {" l list known partition types", 399}, + {" m print this menu", 400}, + {" n add a new partition", 401}, + {" o create a new empty DOS partition table", 402}, + {" p print the partition table", 403}, + {" q quit without saving changes", 404}, + {" s create a new empty Sun disklabel", 405}, + {" t change a partition's system id", 406}, + {" u change display/entry units", 407}, + {" v verify the partition table", 408}, + {" w write table to disk and exit", 409}, + {" x extra functionality (experts only)", 410}, + {" a select bootable partition", 411}, + {" b edit bootfile entry", 412}, + {" c select sgi swap partition", 413}, + {" a toggle a bootable flag", 414}, + {" c toggle the dos compatibility flag", 415}, + {" a change number of alternate cylinders", 416}, + {" c change number of cylinders", 417}, + {" d print the raw data in the partition table", 418}, + {" e change number of extra sectors per cylinder", 419}, + {" h change number of heads", 420}, + {" i change interleave factor", 421}, + {" o change rotation speed (rpm)", 422}, + {" r return to main menu", 423}, + {" s change number of sectors/track", 424}, + {" y change number of physical cylinders", 425}, + {" b move beginning of data in a partition", 426}, + {" e list extended partitions", 427}, + {" g create an IRIX partition table", 428}, + {" f fix partition order", 429}, + {"You must set", 430}, + {"heads", 431}, + {"sectors", 432}, + {"cylinders", 433}, {"\ %s%s.\n\ -You can do this from the extra functions menu.\n", 431}, - {" and ", 432}, +You can do this from the extra functions menu.\n", 434}, + {" and ", 435}, {"\ \n\ The number of cylinders for this disk is set to %d.\n\ @@ -517,152 +520,151 @@ There is nothing wrong with that, but this is larger than 1024,\n\ and could in certain setups cause problems with:\n\ 1) software that runs at boot time (e.g., old versions of LILO)\n\ 2) booting and partitioning software from other OSs\n\ - (e.g., DOS FDISK, OS/2 FDISK)\n", 433}, - {"Bad offset in primary extended partition\n", 434}, - {"Warning: deleting partitions after %d\n", 435}, - {"Warning: extra link pointer in partition table %d\n", 436}, - {"Warning: ignoring extra data in partition table %d\n", 437}, + (e.g., DOS FDISK, OS/2 FDISK)\n", 436}, + {"Bad offset in primary extended partition\n", 437}, + {"Warning: deleting partitions after %d\n", 438}, + {"Warning: extra link pointer in partition table %d\n", 439}, + {"Warning: ignoring extra data in partition table %d\n", 440}, {"\ Building a new DOS disklabel. Changes will remain in memory only,\n\ until you decide to write them. After that, of course, the previous\n\ content won't be recoverable.\n\ -\n", 438}, - {"Note: sector size is %d (not %d)\n", 439}, - {"You will not be able to write the partition table.\n", 440}, +\n", 441}, + {"Note: sector size is %d (not %d)\n", 442}, + {"You will not be able to write the partition table.\n", 443}, {"\ Device contains neither a valid DOS partition table, nor Sun, SGI or OSF \ -disklabel\n", 441}, - {"Internal error\n", 442}, - {"Ignoring extra extended partition %d\n", 443}, +disklabel\n", 444}, + {"Internal error\n", 445}, + {"Ignoring extra extended partition %d\n", 446}, {"\ Warning: invalid flag 0x%04x of partition table %d will be corrected by \ -w(rite)\n", 444}, +w(rite)\n", 447}, {"\ \n\ -got EOF thrice - exiting..\n", 445}, - {"Hex code (type L to list codes): ", 446}, - {"%s (%d-%d, default %d): ", 447}, - {"Using default value %d\n", 448}, - {"Value out of range.\n", 449}, - {"Partition number", 450}, - {"Warning: partition %d has empty type\n", 451}, - {"cylinder", 452}, - {"sector", 453}, - {"Changing display/entry units to %s\n", 454}, - {"WARNING: Partition %d is an extended partition\n", 455}, - {"DOS Compatibility flag is set\n", 456}, - {"DOS Compatibility flag is not set\n", 457}, - {"Partition %d does not exist yet!\n", 458}, +got EOF thrice - exiting..\n", 448}, + {"Hex code (type L to list codes): ", 449}, + {"%s (%d-%d, default %d): ", 450}, + {"Using default value %d\n", 451}, + {"Value out of range.\n", 452}, + {"Partition number", 453}, + {"Warning: partition %d has empty type\n", 454}, + {"cylinder", 455}, + {"sector", 456}, + {"Changing display/entry units to %s\n", 457}, + {"WARNING: Partition %d is an extended partition\n", 458}, + {"DOS Compatibility flag is set\n", 459}, + {"DOS Compatibility flag is not set\n", 460}, + {"Partition %d does not exist yet!\n", 461}, {"\ Type 0 means free space to many systems\n\ (but not to Linux). Having partitions of\n\ type 0 is probably unwise. You can delete\n\ -a partition using the `d' command.\n", 459}, +a partition using the `d' command.\n", 462}, {"\ You cannot change a partition into an extended one or vice versa\n\ -Delete it first.\n", 460}, +Delete it first.\n", 463}, {"\ Consider leaving partition 3 as Whole disk (5),\n\ as SunOS/Solaris expects it and even Linux likes it.\n\ -\n", 461}, +\n", 464}, {"\ Consider leaving partition 9 as volume header (0),\n\ and partition 11 as entire volume (6)as IRIX expects it.\n\ -\n", 462}, - {"Changed system type of partition %d to %x (%s)\n", 463}, - {"Partition %d has different physical/logical beginnings (non-Linux?):\n", 464}, - {" phys=(%d, %d, %d) ", 465}, - {"logical=(%d, %d, %d)\n", 466}, - {"Partition %d has different physical/logical endings:\n", 467}, - {"Partition %i does not start on cylinder boundary:\n", 468}, - {"should be (%d, %d, 1)\n", 469}, - {"Partition %i does not end on cylinder boundary:\n", 470}, - {"should be (%d, %d, %d)\n", 471}, +\n", 465}, + {"Changed system type of partition %d to %x (%s)\n", 466}, + {"Partition %d has different physical/logical beginnings (non-Linux?):\n", 467}, + {" phys=(%d, %d, %d) ", 468}, + {"logical=(%d, %d, %d)\n", 469}, + {"Partition %d has different physical/logical endings:\n", 470}, + {"Partition %i does not start on cylinder boundary:\n", 471}, + {"should be (%d, %d, 1)\n", 472}, + {"Partition %i does not end on cylinder boundary:\n", 473}, + {"should be (%d, %d, %d)\n", 474}, {"\ \n\ Disk %s: %d heads, %d sectors, %d cylinders\n\ Units = %s of %d * %d bytes\n\ -\n", 472}, +\n", 475}, {"\ Nothing to do. Ordering is correct already.\n\ -\n", 473}, - {"%*s Boot Start End Blocks Id System\n", 474}, - {"Device", 475}, +\n", 476}, + {"%*s Boot Start End Blocks Id System\n", 477}, + {"Device", 478}, {"\ \n\ -Partition table entries are not in disk order\n", 476}, +Partition table entries are not in disk order\n", 479}, {"\ \n\ Disk %s: %d heads, %d sectors, %d cylinders\n\ -\n", 477}, - {"Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID\n", 478}, - {"Warning: partition %d contains sector 0\n", 479}, - {"Partition %d: head %d greater than maximum %d\n", 480}, - {"Partition %d: sector %d greater than maximum %d\n", 481}, - {"Partitions %d: cylinder %d greater than maximum %d\n", 482}, - {"Partition %d: previous sectors %d disagrees with total %d\n", 483}, - {"Warning: bad start-of-data in partition %d\n", 484}, - {"Warning: partition %d overlaps partition %d.\n", 485}, - {"Warning: partition %d is empty\n", 486}, - {"Logical partition %d not entirely in partition %d\n", 487}, - {"Total allocated sectors %d greater than the maximum %d\n", 488}, - {"%d unallocated sectors\n", 489}, - {"Partition %d is already defined. Delete it before re-adding it.\n", 490}, - {"First %s", 491}, - {"Sector %d is already allocated\n", 492}, - {"No free sectors available\n", 493}, - {"Last %s or +size or +sizeM or +sizeK", 494}, - {"Warning: partition %d has an odd number of sectors.\n", 495}, - {"The maximum number of partitions has been created\n", 496}, - {"You must delete some partition and add an extended partition first\n", 497}, +\n", 480}, + {"Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID\n", 481}, + {"Warning: partition %d contains sector 0\n", 482}, + {"Partition %d: head %d greater than maximum %d\n", 483}, + {"Partition %d: sector %d greater than maximum %d\n", 484}, + {"Partitions %d: cylinder %d greater than maximum %d\n", 485}, + {"Partition %d: previous sectors %d disagrees with total %d\n", 486}, + {"Warning: bad start-of-data in partition %d\n", 487}, + {"Warning: partition %d overlaps partition %d.\n", 488}, + {"Warning: partition %d is empty\n", 489}, + {"Logical partition %d not entirely in partition %d\n", 490}, + {"Total allocated sectors %d greater than the maximum %d\n", 491}, + {"%d unallocated sectors\n", 492}, + {"Partition %d is already defined. Delete it before re-adding it.\n", 493}, + {"First %s", 494}, + {"Sector %d is already allocated\n", 495}, + {"No free sectors available\n", 496}, + {"Last %s or +size or +sizeM or +sizeK", 497}, + {"The maximum number of partitions has been created\n", 498}, + {"You must delete some partition and add an extended partition first\n", 499}, {"\ Command action\n\ %s\n\ - p primary partition (1-4)\n", 498}, - {"l logical (5 or over)", 499}, - {"e extended", 500}, - {"Invalid partition number for type `%c'\n", 501}, + p primary partition (1-4)\n", 500}, + {"l logical (5 or over)", 501}, + {"e extended", 502}, + {"Invalid partition number for type `%c'\n", 503}, {"\ The partition table has been altered!\n\ -\n", 502}, - {"Calling ioctl() to re-read partition table.\n", 503}, +\n", 504}, + {"Calling ioctl() to re-read partition table.\n", 505}, {"\ Re-read table failed with error %d: %s.\n\ -Reboot your system to ensure the partition table is updated.\n", 504}, +Reboot your system to ensure the partition table is updated.\n", 506}, {"\ \n\ WARNING: If you have created or modified any DOS 6.x\n\ partitions, please see the fdisk manual page for additional\n\ -information.\n", 505}, - {"Syncing disks.\n", 506}, - {"Partition %d has no data area\n", 507}, - {"New beginning of data", 508}, - {"Expert command (m for help): ", 509}, - {"Number of cylinders", 510}, - {"Number of heads", 511}, - {"Number of sectors", 512}, - {"Warning: setting sector offset for DOS compatiblity\n", 513}, - {"Disk %s doesn't contain a valid partition table\n", 514}, - {"Cannot open %s\n", 515}, - {"cannot open %s\n", 516}, - {"%c: unknown command\n", 517}, - {"This kernel finds the sector size itself - -b option ignored\n", 518}, +information.\n", 507}, + {"Syncing disks.\n", 508}, + {"Partition %d has no data area\n", 509}, + {"New beginning of data", 510}, + {"Expert command (m for help): ", 511}, + {"Number of cylinders", 512}, + {"Number of heads", 513}, + {"Number of sectors", 514}, + {"Warning: setting sector offset for DOS compatiblity\n", 515}, + {"Disk %s doesn't contain a valid partition table\n", 516}, + {"Cannot open %s\n", 517}, + {"cannot open %s\n", 518}, + {"%c: unknown command\n", 519}, + {"This kernel finds the sector size itself - -b option ignored\n", 520}, {"\ Warning: the -b (set sector size) option should be used with one specified \ -device\n", 519}, +device\n", 521}, {"\ Detected an OSF/1 disklabel on %s, entering disklabel mode.\n\ -To return to DOS partition table mode, use the 'r' command.\n", 520}, - {"Command (m for help): ", 521}, +To return to DOS partition table mode, use the 'r' command.\n", 522}, + {"Command (m for help): ", 523}, {"\ \n\ -The current boot file is: %s\n", 522}, - {"Please enter the name of the new boot file: ", 523}, - {"Boot file unchanged\n", 524}, +The current boot file is: %s\n", 524}, + {"Please enter the name of the new boot file: ", 525}, + {"Boot file unchanged\n", 526}, {"\ \n\ \tSorry, no experts menu for SGI partition tables available.\n\ -\n", 525}, +\n", 527}, {"\ \n\ \tThere is a valid AIX label on this disk.\n\ @@ -675,94 +677,94 @@ The current boot file is: %s\n", 522}, \t erase the other disks as well, if unmirrored.)\n\ \t3. Before deleting this physical volume be sure\n\ \t to remove the disk logically from your AIX\n\ -\t machine. (Otherwise you become an AIXpert).", 526}, +\t machine. (Otherwise you become an AIXpert).", 528}, {"\ \n\ -BSD label for device: %s\n", 527}, - {" d delete a BSD partition", 528}, - {" e edit drive data", 529}, - {" i install bootstrap", 530}, - {" l list known filesystem types", 531}, - {" n add a new BSD partition", 532}, - {" p print BSD partition table", 533}, - {" s show complete disklabel", 534}, - {" t change a partition's filesystem id", 535}, - {" u change units (cylinders/sectors)", 536}, - {" w write disklabel to disk", 537}, - {" x link BSD partition to non-BSD partition", 538}, - {"Partition %s has invalid starting sector 0.\n", 539}, - {"Reading disklabel of %s at sector %d.\n", 540}, - {"There is no *BSD partition on %s.\n", 541}, - {"BSD disklabel command (m for help): ", 542}, - {"type: %s\n", 543}, - {"type: %d\n", 544}, - {"disk: %.*s\n", 545}, - {"label: %.*s\n", 546}, - {"flags:", 547}, - {" removable", 548}, - {" ecc", 549}, - {" badsect", 550}, - {"bytes/sector: %ld\n", 551}, - {"sectors/track: %ld\n", 552}, - {"tracks/cylinder: %ld\n", 553}, - {"sectors/cylinder: %ld\n", 554}, - {"cylinders: %ld\n", 555}, - {"rpm: %d\n", 556}, - {"interleave: %d\n", 557}, - {"trackskew: %d\n", 558}, - {"cylinderskew: %d\n", 559}, - {"headswitch: %ld\t\t# milliseconds\n", 560}, - {"track-to-track seek: %ld\t# milliseconds\n", 561}, - {"drivedata: ", 562}, +BSD label for device: %s\n", 529}, + {" d delete a BSD partition", 530}, + {" e edit drive data", 531}, + {" i install bootstrap", 532}, + {" l list known filesystem types", 533}, + {" n add a new BSD partition", 534}, + {" p print BSD partition table", 535}, + {" s show complete disklabel", 536}, + {" t change a partition's filesystem id", 537}, + {" u change units (cylinders/sectors)", 538}, + {" w write disklabel to disk", 539}, + {" x link BSD partition to non-BSD partition", 540}, + {"Partition %s has invalid starting sector 0.\n", 541}, + {"Reading disklabel of %s at sector %d.\n", 542}, + {"There is no *BSD partition on %s.\n", 543}, + {"BSD disklabel command (m for help): ", 544}, + {"type: %s\n", 545}, + {"type: %d\n", 546}, + {"disk: %.*s\n", 547}, + {"label: %.*s\n", 548}, + {"flags:", 549}, + {" removable", 550}, + {" ecc", 551}, + {" badsect", 552}, + {"bytes/sector: %ld\n", 553}, + {"sectors/track: %ld\n", 554}, + {"tracks/cylinder: %ld\n", 555}, + {"sectors/cylinder: %ld\n", 556}, + {"cylinders: %ld\n", 557}, + {"rpm: %d\n", 558}, + {"interleave: %d\n", 559}, + {"trackskew: %d\n", 560}, + {"cylinderskew: %d\n", 561}, + {"headswitch: %ld\t\t# milliseconds\n", 562}, + {"track-to-track seek: %ld\t# milliseconds\n", 563}, + {"drivedata: ", 564}, {"\ \n\ -%d partitions:\n", 563}, - {"# start end size fstype [fsize bsize cpg]\n", 564}, - {"Writing disklabel to %s.\n", 565}, - {"%s contains no disklabel.\n", 566}, - {"Do you want to create a disklabel? (y/n) ", 567}, - {"bytes/sector", 568}, - {"sectors/track", 569}, - {"tracks/cylinder", 570}, - {"sectors/cylinder", 571}, - {"Must be <= sectors/track * tracks/cylinder (default).\n", 572}, - {"rpm", 573}, - {"interleave", 574}, - {"trackskew", 575}, - {"cylinderskew", 576}, - {"headswitch", 577}, - {"track-to-track seek", 578}, - {"Bootstrap: %sboot -> boot%s (%s): ", 579}, - {"Bootstrap overlaps with disk label!\n", 580}, - {"Bootstrap installed on %s.\n", 581}, - {"Partition (a-%c): ", 582}, - {"This partition already exists.\n", 583}, - {"Warning: too many partitions (%d, maximum is %d).\n", 584}, +%d partitions:\n", 565}, + {"# start end size fstype [fsize bsize cpg]\n", 566}, + {"Writing disklabel to %s.\n", 567}, + {"%s contains no disklabel.\n", 568}, + {"Do you want to create a disklabel? (y/n) ", 569}, + {"bytes/sector", 570}, + {"sectors/track", 571}, + {"tracks/cylinder", 572}, + {"sectors/cylinder", 573}, + {"Must be <= sectors/track * tracks/cylinder (default).\n", 574}, + {"rpm", 575}, + {"interleave", 576}, + {"trackskew", 577}, + {"cylinderskew", 578}, + {"headswitch", 579}, + {"track-to-track seek", 580}, + {"Bootstrap: %sboot -> boot%s (%s): ", 581}, + {"Bootstrap overlaps with disk label!\n", 582}, + {"Bootstrap installed on %s.\n", 583}, + {"Partition (a-%c): ", 584}, + {"This partition already exists.\n", 585}, + {"Warning: too many partitions (%d, maximum is %d).\n", 586}, {"\ \n\ -Syncing disks.\n", 585}, - {"SGI volhdr", 586}, - {"SGI trkrepl", 587}, - {"SGI secrepl", 588}, - {"SGI raw", 589}, - {"SGI bsd", 590}, - {"SGI sysv", 591}, - {"SGI volume", 592}, - {"SGI efs", 593}, - {"SGI lvol", 594}, - {"SGI rlvol", 595}, - {"SGI xfs", 596}, - {"SGI xfslog", 597}, - {"SGI xlv", 598}, - {"SGI xvm", 599}, - {"Linux swap", 600}, - {"Linux native", 601}, - {"Linux LVM", 602}, - {"Linux RAID", 603}, +Syncing disks.\n", 587}, + {"SGI volhdr", 588}, + {"SGI trkrepl", 589}, + {"SGI secrepl", 590}, + {"SGI raw", 591}, + {"SGI bsd", 592}, + {"SGI sysv", 593}, + {"SGI volume", 594}, + {"SGI efs", 595}, + {"SGI lvol", 596}, + {"SGI rlvol", 597}, + {"SGI xfs", 598}, + {"SGI xfslog", 599}, + {"SGI xlv", 600}, + {"SGI xvm", 601}, + {"Linux swap", 602}, + {"Linux native", 603}, + {"Linux LVM", 604}, + {"Linux RAID", 605}, {"\ According to MIPS Computer Systems, Inc the Label must not contain more than \ -512 bytes\n", 604}, - {"Detected sgi disklabel with wrong checksum.\n", 605}, +512 bytes\n", 606}, + {"Detected sgi disklabel with wrong checksum.\n", 607}, {"\ \n\ Disk %s (SGI disk label): %d heads, %d sectors\n\ @@ -770,139 +772,140 @@ Disk %s (SGI disk label): %d heads, %d sectors\n\ %d extra sects/cyl, interleave %d:1\n\ %s\n\ Units = %s of %d * 512 bytes\n\ -\n", 606}, +\n", 608}, {"\ \n\ Disk %s (SGI disk label): %d heads, %d sectors, %d cylinders\n\ Units = %s of %d * 512 bytes\n\ -\n", 607}, +\n", 609}, {"\ ----- partitions -----\n\ -%*s Info Start End Sectors Id System\n", 608}, +Pt# %*s Info Start End Sectors Id System\n", 610}, {"\ ------ bootinfo -----\n\ +----- Bootinfo -----\n\ Bootfile: %s\n\ ------ directory entries -----\n", 609}, - {"%2d: %-10s sector%5u size%8u\n", 610}, +----- Directory Entries -----\n", 611}, + {"%2d: %-10s sector%5u size%8u\n", 612}, {"\ \n\ Invalid Bootfile!\n\ \tThe bootfile must be an absolute non-zero pathname,\n\ -\te.g. \"/unix\" or \"/unix.save\".\n", 611}, +\te.g. \"/unix\" or \"/unix.save\".\n", 613}, {"\ \n\ -\tName of Bootfile too long: 16 bytes maximum.\n", 612}, +\tName of Bootfile too long: 16 bytes maximum.\n", 614}, {"\ \n\ -\tBootfile must have a fully qualified pathname.\n", 613}, +\tBootfile must have a fully qualified pathname.\n", 615}, {"\ \n\ \tBe aware, that the bootfile is not checked for existence.\n\ -\tSGI's default is \"/unix\" and for backup \"/unix.save\".\n", 614}, +\tSGI's default is \"/unix\" and for backup \"/unix.save\".\n", 616}, {"\ \n\ -\tBootfile is changed to \"%s\".\n", 615}, - {"More than one entire disk entry present.\n", 616}, - {"No partitions defined\n", 617}, - {"IRIX likes when Partition 11 covers the entire disk.\n", 618}, +\tBootfile is changed to \"%s\".\n", 617}, + {"More than one entire disk entry present.\n", 618}, + {"No partitions defined\n", 619}, + {"IRIX likes when Partition 11 covers the entire disk.\n", 620}, {"\ The entire disk partition should start at block 0,\n\ -not at diskblock %d.\n", 619}, +not at diskblock %d.\n", 621}, {"\ The entire disk partition is only %d diskblock large,\n\ -but the disk is %d diskblocks long.\n", 620}, - {"One Partition (#11) should cover the entire disk.\n", 621}, - {"Partition %d does not start on cylinder boundary.\n", 622}, - {"Partition %d does not end on cylinder boundary.\n", 623}, - {"The Partition %d and %d overlap by %d sectors.\n", 624}, - {"Unused gap of %8d sectors - sectors %8d-%d\n", 625}, +but the disk is %d diskblocks long.\n", 622}, + {"One Partition (#11) should cover the entire disk.\n", 623}, + {"Partition %d does not start on cylinder boundary.\n", 624}, + {"Partition %d does not end on cylinder boundary.\n", 625}, + {"The Partition %d and %d overlap by %d sectors.\n", 626}, + {"Unused gap of %8d sectors - sectors %8d-%d\n", 627}, {"\ \n\ -The boot partition does not exist.\n", 626}, +The boot partition does not exist.\n", 628}, {"\ \n\ -The swap partition does not exist.\n", 627}, +The swap partition does not exist.\n", 629}, {"\ \n\ -The swap partition has no swap type.\n", 628}, - {"\tYou have chosen an unusual boot file name.\n", 629}, - {"Sorry You may change the Tag of non-empty partitions.\n", 630}, +The swap partition has no swap type.\n", 630}, + {"\tYou have chosen an unusual boot file name.\n", 631}, + {"Sorry You may change the Tag of non-empty partitions.\n", 632}, {"\ It is highly recommended that the partition at offset 0\n\ is of type \"SGI volhdr\", the IRIX system will rely on it to\n\ retrieve from its directory standalone tools like sash and fx.\n\ Only the \"SGI volume\" entire disk section may violate this.\n\ -Type YES if you are sure about tagging this partition differently.\n", 631}, - {"Do You know, You got a partition overlap on the disk?\n", 632}, - {"Attempting to generate entire disk entry automatically.\n", 633}, - {"The entire disk is already covered with partitions.\n", 634}, - {"You got a partition overlap on the disk. Fix it first!\n", 635}, +Type YES if you are sure about tagging this partition differently.\n", 633}, + {"Do You know, You got a partition overlap on the disk?\n", 634}, + {"Attempting to generate entire disk entry automatically.\n", 635}, + {"The entire disk is already covered with partitions.\n", 636}, + {"You got a partition overlap on the disk. Fix it first!\n", 637}, {"\ It is highly recommended that eleventh partition\n\ -covers the entire disk and is of type `SGI volume'\n", 636}, - {"You will get a partition overlap on the disk. Fix it first!\n", 637}, - {" Last %s", 638}, +covers the entire disk and is of type `SGI volume'\n", 638}, + {"You will get a partition overlap on the disk. Fix it first!\n", 639}, + {" Last %s", 640}, {"\ Building a new SGI disklabel. Changes will remain in memory only,\n\ until you decide to write them. After that, of course, the previous\n\ content will be unrecoverably lost.\n\ -\n", 639}, - {"Trying to keep parameters of partition %d.\n", 640}, - {"ID=%02x\tSTART=%d\tLENGTH=%d\n", 641}, - {"Empty", 642}, - {"SunOS root", 643}, - {"SunOS swap", 644}, - {"SunOS usr", 645}, - {"Whole disk", 646}, - {"SunOS stand", 647}, - {"SunOS var", 648}, - {"SunOS home", 649}, +\n", 641}, + {"Trying to keep parameters of partition %d.\n", 642}, + {"ID=%02x\tSTART=%d\tLENGTH=%d\n", 643}, + {"Empty", 644}, + {"SunOS root", 645}, + {"SunOS swap", 646}, + {"SunOS usr", 647}, + {"Whole disk", 648}, + {"SunOS stand", 649}, + {"SunOS var", 650}, + {"SunOS home", 651}, + {"Linux raid autodetect", 652}, {"\ Detected sun disklabel with wrong checksum.\n\ Probably you'll have to set all the values,\n\ e.g. heads, sectors, cylinders and partitions\n\ -or force a fresh label (s command in main menu)\n", 650}, - {"Autoconfigure found a %s%s%s\n", 651}, +or force a fresh label (s command in main menu)\n", 653}, + {"Autoconfigure found a %s%s%s\n", 654}, {"\ Building a new sun disklabel. Changes will remain in memory only,\n\ until you decide to write them. After that, of course, the previous\n\ content won't be recoverable.\n\ -\n", 652}, +\n", 655}, {"\ Drive type\n\ ? auto configure\n\ - 0 custom (with hardware detected defaults)", 653}, - {"Select type (? for auto, 0 for custom): ", 654}, - {"Autoconfigure failed.\n", 655}, - {"Sectors/track", 656}, - {"Alternate cylinders", 657}, - {"Physical cylinders", 658}, - {"Rotation speed (rpm)", 659}, - {"Interleave factor", 660}, - {"Extra sectors per cylinder", 661}, - {"You may change all the disk params from the x menu", 662}, - {"3,5\" floppy", 663}, - {"Linux custom", 664}, - {"Partition %d doesn't end on cylinder boundary\n", 665}, - {"Partition %d overlaps with others in sectors %d-%d\n", 666}, - {"Unused gap - sectors 0-%d\n", 667}, - {"Unused gap - sectors %d-%d\n", 668}, + 0 custom (with hardware detected defaults)", 656}, + {"Select type (? for auto, 0 for custom): ", 657}, + {"Autoconfigure failed.\n", 658}, + {"Sectors/track", 659}, + {"Alternate cylinders", 660}, + {"Physical cylinders", 661}, + {"Rotation speed (rpm)", 662}, + {"Interleave factor", 663}, + {"Extra sectors per cylinder", 664}, + {"You may change all the disk params from the x menu", 665}, + {"3,5\" floppy", 666}, + {"Linux custom", 667}, + {"Partition %d doesn't end on cylinder boundary\n", 668}, + {"Partition %d overlaps with others in sectors %d-%d\n", 669}, + {"Unused gap - sectors 0-%d\n", 670}, + {"Unused gap - sectors %d-%d\n", 671}, {"\ Other partitions already cover the whole disk.\n\ -Delete some/shrink them before retry.\n", 669}, +Delete some/shrink them before retry.\n", 672}, {"\ You haven't covered the whole disk with the 3rd partition, but your value\n\ %d %s covers some other partition. Your entry has been changed\n\ -to %d %s\n", 670}, +to %d %s\n", 673}, {"\ If you want to maintain SunOS/Solaris compatibility, consider leaving this\n\ -partition as Whole disk (5), starting at 0, with %u sectors\n", 671}, +partition as Whole disk (5), starting at 0, with %u sectors\n", 674}, {"\ It is highly recommended that the partition at offset 0\n\ is UFS, EXT2FS filesystem or SunOS swap. Putting Linux swap\n\ there may destroy your partition table and bootblock.\n\ Type YES if you're very sure you would like that partition\n\ -tagged with 82 (Linux swap): ", 672}, +tagged with 82 (Linux swap): ", 675}, {"\ \n\ Disk %s (Sun disk label): %d heads, %d sectors, %d rpm\n\ @@ -910,451 +913,455 @@ Disk %s (Sun disk label): %d heads, %d sectors, %d rpm\n\ %d extra sects/cyl, interleave %d:1\n\ %s\n\ Units = %s of %d * 512 bytes\n\ -\n", 673}, +\n", 676}, {"\ \n\ Disk %s (Sun disk label): %d heads, %d sectors, %d cylinders\n\ Units = %s of %d * 512 bytes\n\ -\n", 674}, - {"%*s Flag Start End Blocks Id System\n", 675}, - {"Number of alternate cylinders", 676}, - {"Number of physical cylinders", 677}, - {"FAT12", 678}, - {"XENIX root", 679}, - {"XENIX usr", 680}, - {"FAT16 <32M", 681}, - {"Extended", 682}, - {"FAT16", 683}, - {"HPFS/NTFS", 684}, - {"AIX", 685}, - {"AIX bootable", 686}, - {"OS/2 Boot Manager", 687}, - {"Win95 FAT32", 688}, - {"Win95 FAT32 (LBA)", 689}, - {"Win95 FAT16 (LBA)", 690}, - {"Win95 Ext'd (LBA)", 691}, - {"OPUS", 692}, - {"Hidden FAT12", 693}, - {"Compaq diagnostics", 694}, - {"Hidden FAT16 <32M", 695}, - {"Hidden FAT16", 696}, - {"Hidden HPFS/NTFS", 697}, - {"AST Windows swapfile", 698}, - {"Hidden Win95 FAT32", 699}, - {"Hidden Win95 FAT32 (LBA)", 700}, - {"Hidden Win95 FAT16 (LBA)", 701}, - {"NEC DOS", 702}, - {"Plan 9", 703}, - {"PartitionMagic recovery", 704}, - {"Venix 80286", 705}, - {"PPC PReP Boot", 706}, - {"SFS", 707}, - {"QNX4.x", 708}, - {"QNX4.x 2nd part", 709}, - {"QNX4.x 3rd part", 710}, - {"OnTrack DM", 711}, - {"OnTrack DM6 Aux1", 712}, - {"CP/M", 713}, - {"OnTrack DM6 Aux3", 714}, - {"OnTrackDM6", 715}, - {"EZ-Drive", 716}, - {"Golden Bow", 717}, - {"Priam Edisk", 718}, - {"SpeedStor", 719}, - {"GNU HURD or SysV", 720}, - {"Novell Netware 286", 721}, - {"Novell Netware 386", 722}, - {"DiskSecure Multi-Boot", 723}, - {"PC/IX", 724}, - {"Old Minix", 725}, - {"Minix / old Linux", 726}, - {"OS/2 hidden C: drive", 727}, - {"Linux extended", 728}, - {"NTFS volume set", 729}, - {"Amoeba", 730}, - {"Amoeba BBT", 731}, - {"BSD/OS", 732}, - {"IBM Thinkpad hibernation", 733}, - {"BSD/386", 734}, - {"OpenBSD", 735}, - {"NeXTSTEP", 736}, - {"BSDI fs", 737}, - {"BSDI swap", 738}, - {"DRDOS/sec (FAT-12)", 739}, - {"DRDOS/sec (FAT-16 < 32M)", 740}, - {"DRDOS/sec (FAT-16)", 741}, - {"Syrinx", 742}, - {"Non-FS data", 743}, - {"CP/M / CTOS / ...", 744}, - {"Dell Utility", 745}, - {"DOS access", 746}, - {"DOS R/O", 747}, - {"BeOS fs", 748}, - {"EFI GPT", 749}, - {"EFI (FAT-12/16/32)", 750}, - {"DOS secondary", 751}, - {"Linux raid autodetect", 752}, - {"LANstep", 753}, - {"BBT", 754}, - {"seek error on %s - cannot seek to %lu\n", 755}, - {"seek error: wanted 0x%08x%08x, got 0x%08x%08x\n", 756}, - {"out of memory - giving up\n", 757}, - {"read error on %s - cannot read sector %lu\n", 758}, - {"ERROR: sector %lu does not have an msdos signature\n", 759}, - {"write error on %s - cannot write sector %lu\n", 760}, - {"cannot open partition sector save file (%s)\n", 761}, - {"write error on %s\n", 762}, - {"cannot stat partition restore file (%s)\n", 763}, - {"partition restore file has wrong size - not restoring\n", 764}, - {"out of memory?\n", 765}, - {"cannot open partition restore file (%s)\n", 766}, - {"error reading %s\n", 767}, - {"cannot open device %s for writing\n", 768}, - {"error writing sector %lu on %s\n", 769}, - {"Disk %s: cannot get size\n", 770}, - {"Disk %s: cannot get geometry\n", 771}, +\n", 677}, + {"%*s Flag Start End Blocks Id System\n", 678}, + {"Number of alternate cylinders", 679}, + {"Number of physical cylinders", 680}, + {"FAT12", 681}, + {"XENIX root", 682}, + {"XENIX usr", 683}, + {"FAT16 <32M", 684}, + {"Extended", 685}, + {"FAT16", 686}, + {"HPFS/NTFS", 687}, + {"AIX", 688}, + {"AIX bootable", 689}, + {"OS/2 Boot Manager", 690}, + {"Win95 FAT32", 691}, + {"Win95 FAT32 (LBA)", 692}, + {"Win95 FAT16 (LBA)", 693}, + {"Win95 Ext'd (LBA)", 694}, + {"OPUS", 695}, + {"Hidden FAT12", 696}, + {"Compaq diagnostics", 697}, + {"Hidden FAT16 <32M", 698}, + {"Hidden FAT16", 699}, + {"Hidden HPFS/NTFS", 700}, + {"AST SmartSleep", 701}, + {"Hidden Win95 FAT32", 702}, + {"Hidden Win95 FAT32 (LBA)", 703}, + {"Hidden Win95 FAT16 (LBA)", 704}, + {"NEC DOS", 705}, + {"Plan 9", 706}, + {"PartitionMagic recovery", 707}, + {"Venix 80286", 708}, + {"PPC PReP Boot", 709}, + {"SFS", 710}, + {"QNX4.x", 711}, + {"QNX4.x 2nd part", 712}, + {"QNX4.x 3rd part", 713}, + {"OnTrack DM", 714}, + {"OnTrack DM6 Aux1", 715}, + {"CP/M", 716}, + {"OnTrack DM6 Aux3", 717}, + {"OnTrackDM6", 718}, + {"EZ-Drive", 719}, + {"Golden Bow", 720}, + {"Priam Edisk", 721}, + {"SpeedStor", 722}, + {"GNU HURD or SysV", 723}, + {"Novell Netware 286", 724}, + {"Novell Netware 386", 725}, + {"DiskSecure Multi-Boot", 726}, + {"PC/IX", 727}, + {"Old Minix", 728}, + {"Minix / old Linux", 729}, + {"OS/2 hidden C: drive", 730}, + {"Linux extended", 731}, + {"NTFS volume set", 732}, + {"Amoeba", 733}, + {"Amoeba BBT", 734}, + {"BSD/OS", 735}, + {"IBM Thinkpad hibernation", 736}, + {"BSD/386", 737}, + {"OpenBSD", 738}, + {"NeXTSTEP", 739}, + {"BSDI fs", 740}, + {"BSDI swap", 741}, + {"Boot Wizard hidden", 742}, + {"DRDOS/sec (FAT-12)", 743}, + {"DRDOS/sec (FAT-16 < 32M)", 744}, + {"DRDOS/sec (FAT-16)", 745}, + {"Syrinx", 746}, + {"Non-FS data", 747}, + {"CP/M / CTOS / ...", 748}, + {"Dell Utility", 749}, + {"BootIt", 750}, + {"DOS access", 751}, + {"DOS R/O", 752}, + {"BeOS fs", 753}, + {"EFI GPT", 754}, + {"EFI (FAT-12/16/32)", 755}, + {"DOS secondary", 756}, + {"LANstep", 757}, + {"BBT", 758}, + {"seek error on %s - cannot seek to %lu\n", 759}, + {"seek error: wanted 0x%08x%08x, got 0x%08x%08x\n", 760}, + {"out of memory - giving up\n", 761}, + {"read error on %s - cannot read sector %lu\n", 762}, + {"ERROR: sector %lu does not have an msdos signature\n", 763}, + {"write error on %s - cannot write sector %lu\n", 764}, + {"cannot open partition sector save file (%s)\n", 765}, + {"write error on %s\n", 766}, + {"cannot stat partition restore file (%s)\n", 767}, + {"partition restore file has wrong size - not restoring\n", 768}, + {"out of memory?\n", 769}, + {"cannot open partition restore file (%s)\n", 770}, + {"error reading %s\n", 771}, + {"cannot open device %s for writing\n", 772}, + {"error writing sector %lu on %s\n", 773}, + {"Disk %s: cannot get size\n", 774}, + {"Disk %s: cannot get geometry\n", 775}, {"\ Warning: start=%lu - this looks like a partition rather than\n\ the entire disk. Using fdisk on it is probably meaningless.\n\ -[Use the --force option if you really want this]\n", 772}, - {"Warning: HDIO_GETGEO says that there are %lu heads\n", 773}, - {"Warning: HDIO_GETGEO says that there are %lu sectors\n", 774}, - {"Warning: BLKGETSIZE/HDIO_GETGEO says that there are %lu cylinders\n", 775}, +[Use the --force option if you really want this]\n", 776}, + {"Warning: HDIO_GETGEO says that there are %lu heads\n", 777}, + {"Warning: HDIO_GETGEO says that there are %lu sectors\n", 778}, + {"Warning: BLKGETSIZE/HDIO_GETGEO says that there are %lu cylinders\n", 779}, {"\ Warning: unlikely number of sectors (%lu) - usually at most 63\n\ -This will give problems with all software that uses C/H/S addressing.\n", 776}, +This will give problems with all software that uses C/H/S addressing.\n", 780}, {"\ \n\ -Disk %s: %lu cylinders, %lu heads, %lu sectors/track\n", 777}, +Disk %s: %lu cylinders, %lu heads, %lu sectors/track\n", 781}, {"\ -%s of partition %s has impossible value for head: %lu (should be in 0-%lu)\n", 778}, +%s of partition %s has impossible value for head: %lu (should be in 0-%lu)\n", 782}, {"\ %s of partition %s has impossible value for sector: %lu (should be in \ -1-%lu)\n", 779}, +1-%lu)\n", 783}, {"\ %s of partition %s has impossible value for cylinders: %lu (should be in \ -0-%lu)\n", 780}, +0-%lu)\n", 784}, {"\ Id Name\n\ -\n", 781}, - {"Re-reading the partition table ...\n", 782}, +\n", 785}, + {"Re-reading the partition table ...\n", 786}, {"\ The command to re-read the partition table failed\n\ -Reboot your system now, before using mkfs\n", 783}, - {"Error closing %s\n", 784}, - {"%s: no such partition\n", 785}, - {"unrecognized format - using sectors\n", 786}, - {"# partition table of %s\n", 787}, - {"unimplemented format - using %s\n", 788}, +Reboot your system now, before using mkfs\n", 787}, + {"Error closing %s\n", 788}, + {"%s: no such partition\n", 789}, + {"unrecognized format - using sectors\n", 790}, + {"# partition table of %s\n", 791}, + {"unimplemented format - using %s\n", 792}, {"\ Units = cylinders of %lu bytes, blocks of 1024 bytes, counting from %d\n\ -\n", 789}, - {" Device Boot Start End #cyls #blocks Id System\n", 790}, +\n", 793}, + {" Device Boot Start End #cyls #blocks Id System\n", 794}, {"\ Units = sectors of 512 bytes, counting from %d\n\ -\n", 791}, - {" Device Boot Start End #sectors Id System\n", 792}, +\n", 795}, + {" Device Boot Start End #sectors Id System\n", 796}, {"\ Units = blocks of 1024 bytes, counting from %d\n\ -\n", 793}, - {" Device Boot Start End #blocks Id System\n", 794}, +\n", 797}, + {" Device Boot Start End #blocks Id System\n", 798}, {"\ Units = megabytes of 1048576 bytes, blocks of 1024 bytes, counting from %d\n\ -\n", 795}, - {" Device Boot Start End MB #blocks Id System\n", 796}, - {"\t\tstart: (c,h,s) expected (%ld,%ld,%ld) found (%ld,%ld,%ld)\n", 797}, - {"\t\tend: (c,h,s) expected (%ld,%ld,%ld) found (%ld,%ld,%ld)\n", 798}, - {"partition ends on cylinder %ld, beyond the end of the disk\n", 799}, - {"No partitions found\n", 800}, +\n", 799}, + {" Device Boot Start End MB #blocks Id System\n", 800}, + {"\t\tstart: (c,h,s) expected (%ld,%ld,%ld) found (%ld,%ld,%ld)\n", 801}, + {"\t\tend: (c,h,s) expected (%ld,%ld,%ld) found (%ld,%ld,%ld)\n", 802}, + {"partition ends on cylinder %ld, beyond the end of the disk\n", 803}, + {"No partitions found\n", 804}, {"\ Warning: The first partition looks like it was made\n\ for C/H/S=*/%ld/%ld (instead of %ld/%ld/%ld).\n\ -For this listing I'll assume that geometry.\n", 801}, - {"no partition table present.\n", 802}, - {"strange, only %d partitions defined.\n", 803}, - {"Warning: partition %s has size 0 but is not marked Empty\n", 804}, - {"Warning: partition %s has size 0 and is bootable\n", 805}, - {"Warning: partition %s has size 0 and nonzero start\n", 806}, - {"Warning: partition %s ", 807}, - {"is not contained in partition %s\n", 808}, - {"Warning: partitions %s ", 809}, - {"and %s overlap\n", 810}, - {"Warning: partition %s contains part of ", 811}, - {"the partition table (sector %lu),\n", 812}, - {"and will destroy it when filled\n", 813}, - {"Warning: partition %s starts at sector 0\n", 814}, - {"Warning: partition %s extends past end of disk\n", 815}, - {"Among the primary partitions, at most one can be extended\n", 816}, - {" (although this is not a problem under Linux)\n", 817}, - {"Warning: partition %s does not start at a cylinder boundary\n", 818}, - {"Warning: partition %s does not end at a cylinder boundary\n", 819}, +For this listing I'll assume that geometry.\n", 805}, + {"no partition table present.\n", 806}, + {"strange, only %d partitions defined.\n", 807}, + {"Warning: partition %s has size 0 but is not marked Empty\n", 808}, + {"Warning: partition %s has size 0 and is bootable\n", 809}, + {"Warning: partition %s has size 0 and nonzero start\n", 810}, + {"Warning: partition %s ", 811}, + {"is not contained in partition %s\n", 812}, + {"Warning: partitions %s ", 813}, + {"and %s overlap\n", 814}, + {"\ +Warning: partition %s contains part of the partition table (sector %lu),\n\ +and will destroy it when filled\n", 815}, + {"Warning: partition %s starts at sector 0\n", 816}, + {"Warning: partition %s extends past end of disk\n", 817}, + {"\ +Among the primary partitions, at most one can be extended\n\ + (although this is not a problem under Linux)\n", 818}, + {"Warning: partition %s does not start at a cylinder boundary\n", 819}, + {"Warning: partition %s does not end at a cylinder boundary\n", 820}, {"\ Warning: more than one primary partition is marked bootable (active)\n\ -This does not matter for LILO, but the DOS MBR will not boot this disk.\n", 820}, +This does not matter for LILO, but the DOS MBR will not boot this disk.\n", 821}, {"\ Warning: usually one can boot from primary partitions only\n\ -LILO disregards the `bootable' flag.\n", 821}, +LILO disregards the `bootable' flag.\n", 822}, {"\ Warning: no primary partition is marked bootable (active)\n\ -This does not matter for LILO, but the DOS MBR will not boot this disk.\n", 822}, - {"\ -partition %s: start: (c,h,s) expected (%ld,%ld,%ld) found (%ld,%ld,%ld)\n", 823}, - {"partition %s: end: (c,h,s) expected (%ld,%ld,%ld) found (%ld,%ld,%ld)\n", 824}, - {"partition %s ends on cylinder %ld, beyond the end of the disk\n", 825}, - {"Warning: shifted start of the extd partition from %ld to %ld\n", 826}, - {"(For listing purposes only. Do not change its contents.)\n", 827}, - {"Warning: extended partition does not start at a cylinder boundary.\n", 828}, - {"DOS and Linux will interpret the contents differently.\n", 829}, - {"too many partitions - ignoring those past nr (%d)\n", 830}, - {"tree of partitions?\n", 831}, - {"detected Disk Manager - unable to handle that\n", 832}, - {"DM6 signature found - giving up\n", 833}, - {"strange..., an extended partition of size 0?\n", 834}, - {"strange..., a BSD partition of size 0?\n", 835}, - {" %s: unrecognized partition\n", 836}, - {"-n flag was given: Nothing changed\n", 837}, - {"Failed saving the old sectors - aborting\n", 838}, - {"Failed writing the partition on %s\n", 839}, - {"long or incomplete input line - quitting\n", 840}, - {"input error: `=' expected after %s field\n", 841}, - {"input error: unexpected character %c after %s field\n", 842}, - {"unrecognized input: %s\n", 843}, - {"number too big\n", 844}, - {"trailing junk after number\n", 845}, - {"no room for partition descriptor\n", 846}, - {"cannot build surrounding extended partition\n", 847}, - {"too many input fields\n", 848}, - {"No room for more\n", 849}, - {"Illegal type\n", 850}, - {"Warning: given size (%lu) exceeds max allowable size (%lu)\n", 851}, - {"Warning: empty partition\n", 852}, - {"Warning: bad partition start (earliest %lu)\n", 853}, - {"unrecognized bootable flag - choose - or *\n", 854}, - {"partial c,h,s specification?\n", 855}, - {"Extended partition not where expected\n", 856}, - {"bad input\n", 857}, - {"too many partitions\n", 858}, +This does not matter for LILO, but the DOS MBR will not boot this disk.\n", 823}, + {"\ +partition %s: start: (c,h,s) expected (%ld,%ld,%ld) found (%ld,%ld,%ld)\n", 824}, + {"partition %s: end: (c,h,s) expected (%ld,%ld,%ld) found (%ld,%ld,%ld)\n", 825}, + {"partition %s ends on cylinder %ld, beyond the end of the disk\n", 826}, + {"\ +Warning: shifted start of the extd partition from %ld to %ld\n\ +(For listing purposes only. Do not change its contents.)\n", 827}, + {"\ +Warning: extended partition does not start at a cylinder boundary.\n\ +DOS and Linux will interpret the contents differently.\n", 828}, + {"too many partitions - ignoring those past nr (%d)\n", 829}, + {"tree of partitions?\n", 830}, + {"detected Disk Manager - unable to handle that\n", 831}, + {"DM6 signature found - giving up\n", 832}, + {"strange..., an extended partition of size 0?\n", 833}, + {"strange..., a BSD partition of size 0?\n", 834}, + {" %s: unrecognized partition\n", 835}, + {"-n flag was given: Nothing changed\n", 836}, + {"Failed saving the old sectors - aborting\n", 837}, + {"Failed writing the partition on %s\n", 838}, + {"long or incomplete input line - quitting\n", 839}, + {"input error: `=' expected after %s field\n", 840}, + {"input error: unexpected character %c after %s field\n", 841}, + {"unrecognized input: %s\n", 842}, + {"number too big\n", 843}, + {"trailing junk after number\n", 844}, + {"no room for partition descriptor\n", 845}, + {"cannot build surrounding extended partition\n", 846}, + {"too many input fields\n", 847}, + {"No room for more\n", 848}, + {"Illegal type\n", 849}, + {"Warning: given size (%lu) exceeds max allowable size (%lu)\n", 850}, + {"Warning: empty partition\n", 851}, + {"Warning: bad partition start (earliest %lu)\n", 852}, + {"unrecognized bootable flag - choose - or *\n", 853}, + {"partial c,h,s specification?\n", 854}, + {"Extended partition not where expected\n", 855}, + {"bad input\n", 856}, + {"too many partitions\n", 857}, {"\ Input in the following format; absent fields get a default value.\n\ \n\ -Usually you only need to specify and (and perhaps ).\n", 859}, - {"version", 860}, - {"Usage: %s [options] device ...\n", 861}, - {"device: something like /dev/hda or /dev/sda", 862}, - {"useful options:", 863}, - {" -s [or --show-size]: list size of a partition", 864}, - {" -c [or --id]: print or change partition Id", 865}, - {" -l [or --list]: list partitions of each device", 866}, - {" -d [or --dump]: idem, but in a format suitable for later input", 867}, - {" -i [or --increment]: number cylinders etc. from 1 instead of from 0", 868}, +Usually you only need to specify and (and perhaps ).\n", 858}, + {"version", 859}, + {"Usage: %s [options] device ...\n", 860}, + {"device: something like /dev/hda or /dev/sda", 861}, + {"useful options:", 862}, + {" -s [or --show-size]: list size of a partition", 863}, + {" -c [or --id]: print or change partition Id", 864}, + {" -l [or --list]: list partitions of each device", 865}, + {" -d [or --dump]: idem, but in a format suitable for later input", 866}, + {" -i [or --increment]: number cylinders etc. from 1 instead of from 0", 867}, {"\ -uS, -uB, -uC, -uM: accept/report in units of \ -sectors/blocks/cylinders/MB", 869}, - {" -T [or --list-types]:list the known partition types", 870}, - {" -D [or --DOS]: for DOS-compatibility: waste a little space", 871}, - {" -R [or --re-read]: make kernel reread partition table", 872}, - {" -N# : change only the partition with number #", 873}, - {" -n : do not actually write to disk", 874}, - {"\ - -O file : save the sectors that will be overwritten to file", 875}, - {" -I file : restore these sectors again", 876}, - {" -v [or --version]: print version", 877}, - {" -? [or --help]: print this message", 878}, - {"dangerous options:", 879}, - {" -g [or --show-geometry]: print the kernel's idea of the geometry", 880}, +sectors/blocks/cylinders/MB", 868}, + {" -T [or --list-types]:list the known partition types", 869}, + {" -D [or --DOS]: for DOS-compatibility: waste a little space", 870}, + {" -R [or --re-read]: make kernel reread partition table", 871}, + {" -N# : change only the partition with number #", 872}, + {" -n : do not actually write to disk", 873}, + {"\ + -O file : save the sectors that will be overwritten to file", 874}, + {" -I file : restore these sectors again", 875}, + {" -v [or --version]: print version", 876}, + {" -? [or --help]: print this message", 877}, + {"dangerous options:", 878}, + {" -g [or --show-geometry]: print the kernel's idea of the geometry", 879}, {"\ -x [or --show-extended]: also list extended partitions on output\n\ - or expect descriptors for them on input", 881}, - {"\ - -L [or --Linux]: do not complain about things irrelevant for Linux", 882}, - {" -q [or --quiet]: suppress warning messages", 883}, - {" You can override the detected geometry using:", 884}, - {" -C# [or --cylinders #]:set the number of cylinders to use", 885}, - {" -H# [or --heads #]: set the number of heads to use", 886}, - {" -S# [or --sectors #]: set the number of sectors to use", 887}, - {"You can disable all consistency checking with:", 888}, - {" -f [or --force]: do what I say, even if it is stupid", 889}, - {"Usage:", 890}, - {"%s device\t\t list active partitions on device\n", 891}, - {"%s device n1 n2 ... activate partitions n1 ..., inactivate the rest\n", 892}, - {"%s -An device\t activate partition n, inactivate the other ones\n", 893}, - {"no command?\n", 894}, - {"total: %d blocks\n", 895}, - {"usage: sfdisk --print-id device partition-number\n", 896}, - {"usage: sfdisk --change-id device partition-number Id\n", 897}, - {"usage: sfdisk --id device partition-number [Id]\n", 898}, - {"can specify only one device (except with -l or -s)\n", 899}, - {"cannot open %s %s\n", 900}, - {"read-write", 901}, - {"for reading", 902}, - {"%s: OK\n", 903}, - {"%s: %ld cylinders, %ld heads, %ld sectors/track\n", 904}, - {"BLKGETSIZE ioctl failed for %s\n", 905}, - {"bad active byte: 0x%x instead of 0x80\n", 906}, + or expect descriptors for them on input", 880}, + {"\ + -L [or --Linux]: do not complain about things irrelevant for Linux", 881}, + {" -q [or --quiet]: suppress warning messages", 882}, + {" You can override the detected geometry using:", 883}, + {" -C# [or --cylinders #]:set the number of cylinders to use", 884}, + {" -H# [or --heads #]: set the number of heads to use", 885}, + {" -S# [or --sectors #]: set the number of sectors to use", 886}, + {"You can disable all consistency checking with:", 887}, + {" -f [or --force]: do what I say, even if it is stupid", 888}, + {"Usage:", 889}, + {"%s device\t\t list active partitions on device\n", 890}, + {"%s device n1 n2 ... activate partitions n1 ..., inactivate the rest\n", 891}, + {"%s -An device\t activate partition n, inactivate the other ones\n", 892}, + {"no command?\n", 893}, + {"total: %d blocks\n", 894}, + {"usage: sfdisk --print-id device partition-number\n", 895}, + {"usage: sfdisk --change-id device partition-number Id\n", 896}, + {"usage: sfdisk --id device partition-number [Id]\n", 897}, + {"can specify only one device (except with -l or -s)\n", 898}, + {"cannot open %s %s\n", 899}, + {"read-write", 900}, + {"for reading", 901}, + {"%s: OK\n", 902}, + {"%s: %ld cylinders, %ld heads, %ld sectors/track\n", 903}, + {"BLKGETSIZE ioctl failed for %s\n", 904}, + {"bad active byte: 0x%x instead of 0x80\n", 905}, {"\ Done\n\ -\n", 907}, +\n", 906}, {"\ You have %d active primary partitions. This does not matter for LILO,\n\ -but the DOS MBR will only boot a disk with 1 active partition.\n", 908}, - {"partition %s has id %x and is not hidden\n", 909}, - {"Bad Id %lx\n", 910}, - {"This disk is currently in use.\n", 911}, - {"Fatal error: cannot find %s\n", 912}, - {"Warning: %s is not a block device\n", 913}, - {"Checking that no-one is using this disk right now ...\n", 914}, +but the DOS MBR will only boot a disk with 1 active partition.\n", 907}, + {"partition %s has id %x and is not hidden\n", 908}, + {"Bad Id %lx\n", 909}, + {"This disk is currently in use.\n", 910}, + {"Fatal error: cannot find %s\n", 911}, + {"Warning: %s is not a block device\n", 912}, + {"Checking that no-one is using this disk right now ...\n", 913}, {"\ \n\ This disk is currently in use - repartitioning is probably a bad idea.\n\ Umount all file systems, and swapoff all swap partitions on this disk.\n\ -Use the --no-reread flag to suppress this check.\n", 915}, - {"Use the --force flag to overrule all checks.\n", 916}, - {"OK\n", 917}, - {"Old situation:\n", 918}, - {"Partition %d does not exist, cannot change it\n", 919}, - {"New situation:\n", 920}, +Use the --no-reread flag to suppress this check.\n", 914}, + {"Use the --force flag to overrule all checks.\n", 915}, + {"OK\n", 916}, + {"Old situation:\n", 917}, + {"Partition %d does not exist, cannot change it\n", 918}, + {"New situation:\n", 919}, {"\ I don't like these partitions - nothing changed.\n\ -(If you really want this, use the --force option.)\n", 921}, - {"I don't like this - probably you should answer No\n", 922}, - {"Are you satisfied with this? [ynq] ", 923}, - {"Do you want to write this to disk? [ynq] ", 924}, +(If you really want this, use the --force option.)\n", 920}, + {"I don't like this - probably you should answer No\n", 921}, + {"Are you satisfied with this? [ynq] ", 922}, + {"Do you want to write this to disk? [ynq] ", 923}, {"\ \n\ -sfdisk: premature end of input\n", 925}, - {"Quitting - nothing changed\n", 926}, - {"Please answer one of y,n,q\n", 927}, +sfdisk: premature end of input\n", 924}, + {"Quitting - nothing changed\n", 925}, + {"Please answer one of y,n,q\n", 926}, {"\ Successfully wrote the new partition table\n\ -\n", 928}, +\n", 927}, {"\ If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)\n\ to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1\n\ -(See fdisk(8).)\n", 929}, - {"usage: banner [-w width]\n", 930}, - {"Message: ", 931}, - {"The character '%c' is not in my character set", 932}, - {"Message '%s' is OK\n", 933}, - {"Try `getopt --help' for more information.\n", 934}, - {"empty long option after -l or --long argument", 935}, - {"unknown shell after -s or --shell argument", 936}, - {"Usage: getopt optstring parameters\n", 937}, - {" getopt [options] [--] optstring parameters\n", 938}, - {" getopt [options] -o|--options optstring [options] [--]\n", 939}, - {" parameters\n", 940}, - {"\ - -a, --alternative Allow long options starting with single -\n", 941}, - {" -h, --help This small usage guide\n", 942}, - {" -l, --longoptions=longopts Long options to be recognized\n", 943}, - {"\ - -n, --name=progname The name under which errors are reported\n", 944}, - {" -o, --options=optstring Short options to be recognized\n", 945}, - {" -q, --quiet Disable error reporting by getopt(3)\n", 946}, - {" -Q, --quiet-output No normal output\n", 947}, - {" -s, --shell=shell Set shell quoting conventions\n", 948}, - {" -T, --test Test for getopt(1) version\n", 949}, - {" -u, --unqote Do not quote the output\n", 950}, - {" -V, --version Output version information\n", 951}, - {"missing optstring argument", 952}, - {"getopt (enhanced) 1.1.0\n", 953}, - {"internal error, contact the author.", 954}, - {"booted from MILO\n", 955}, - {"Ruffian BCD clock\n", 956}, - {"clockport adjusted to 0x%x\n", 957}, - {"funky TOY!\n", 958}, - {"%s: atomic %s failed for 1000 iterations!", 959}, - {"Cannot open /dev/port: %s", 960}, - {"I failed to get permission because I didn't try.\n", 961}, - {"%s is unable to get I/O port access: the iopl(3) call failed.\n", 962}, - {"Probably you need root privileges.\n", 963}, - {"Assuming hardware clock is kept in %s time.\n", 964}, - {"UTC", 965}, - {"local", 966}, - {"%s: Warning: unrecognized third line in adjtime file\n", 967}, - {"(Expected: `UTC' or `LOCAL' or nothing.)\n", 968}, - {"Last drift adjustment done at %d seconds after 1969\n", 969}, - {"Last calibration done at %d seconds after 1969\n", 970}, - {"Hardware clock is on %s time\n", 971}, - {"unknown", 972}, - {"Waiting for clock tick...\n", 973}, - {"...got clock tick\n", 974}, - {"Invalid values in hardware clock: %4d/%.2d/%.2d %.2d:%.2d:%.2d\n", 975}, - {"Hw clock time : %4d/%.2d/%.2d %.2d:%.2d:%.2d = %ld seconds since 1969\n", 976}, - {"Time read from Hardware Clock: %4d/%.2d/%.2d %02d:%02d:%02d\n", 977}, - {"Setting Hardware Clock to %.2d:%.2d:%.2d = %d seconds since 1969\n", 978}, - {"Clock not changed - testing only.\n", 979}, +(See fdisk(8).)\n", 928}, + {"usage: banner [-w width]\n", 929}, + {"Message: ", 930}, + {"The character '%c' is not in my character set", 931}, + {"Message '%s' is OK\n", 932}, + {"Try `getopt --help' for more information.\n", 933}, + {"empty long option after -l or --long argument", 934}, + {"unknown shell after -s or --shell argument", 935}, + {"Usage: getopt optstring parameters\n", 936}, + {" getopt [options] [--] optstring parameters\n", 937}, + {" getopt [options] -o|--options optstring [options] [--]\n", 938}, + {" parameters\n", 939}, + {"\ + -a, --alternative Allow long options starting with single -\n", 940}, + {" -h, --help This small usage guide\n", 941}, + {" -l, --longoptions=longopts Long options to be recognized\n", 942}, + {"\ + -n, --name=progname The name under which errors are reported\n", 943}, + {" -o, --options=optstring Short options to be recognized\n", 944}, + {" -q, --quiet Disable error reporting by getopt(3)\n", 945}, + {" -Q, --quiet-output No normal output\n", 946}, + {" -s, --shell=shell Set shell quoting conventions\n", 947}, + {" -T, --test Test for getopt(1) version\n", 948}, + {" -u, --unqote Do not quote the output\n", 949}, + {" -V, --version Output version information\n", 950}, + {"missing optstring argument", 951}, + {"getopt (enhanced) 1.1.2\n", 952}, + {"internal error, contact the author.", 953}, + {"booted from MILO\n", 954}, + {"Ruffian BCD clock\n", 955}, + {"clockport adjusted to 0x%x\n", 956}, + {"funky TOY!\n", 957}, + {"%s: atomic %s failed for 1000 iterations!", 958}, + {"Cannot open /dev/port: %s", 959}, + {"I failed to get permission because I didn't try.\n", 960}, + {"%s is unable to get I/O port access: the iopl(3) call failed.\n", 961}, + {"Probably you need root privileges.\n", 962}, + {"Assuming hardware clock is kept in %s time.\n", 963}, + {"UTC", 964}, + {"local", 965}, + {"%s: Warning: unrecognized third line in adjtime file\n", 966}, + {"(Expected: `UTC' or `LOCAL' or nothing.)\n", 967}, + {"Last drift adjustment done at %ld seconds after 1969\n", 968}, + {"Last calibration done at %ld seconds after 1969\n", 969}, + {"Hardware clock is on %s time\n", 970}, + {"unknown", 971}, + {"Waiting for clock tick...\n", 972}, + {"...got clock tick\n", 973}, + {"Invalid values in hardware clock: %4d/%.2d/%.2d %.2d:%.2d:%.2d\n", 974}, + {"Hw clock time : %4d/%.2d/%.2d %.2d:%.2d:%.2d = %ld seconds since 1969\n", 975}, + {"Time read from Hardware Clock: %4d/%.2d/%.2d %02d:%02d:%02d\n", 976}, + {"Setting Hardware Clock to %.2d:%.2d:%.2d = %ld seconds since 1969\n", 977}, + {"Clock not changed - testing only.\n", 978}, {"\ Time elapsed since reference time has been %.6f seconds.\n\ -Delaying further to reach the next full second.\n", 980}, +Delaying further to reach the next full second.\n", 979}, {"\ The Hardware Clock registers contain values that are either invalid (e.g. \ -50th day of month) or beyond the range we can handle (e.g. Year 2095).\n", 981}, - {"%s %.6f seconds\n", 982}, - {"No --date option specified.\n", 983}, +50th day of month) or beyond the range we can handle (e.g. Year 2095).\n", 980}, + {"%s %.6f seconds\n", 981}, + {"No --date option specified.\n", 982}, {"\ The value of the --date option is not a valid date.\n\ -In particular, it contains quotation marks.\n", 984}, - {"Issuing date command: %s\n", 985}, - {"Unable to run 'date' program in /bin/sh shell. popen() failed", 986}, - {"response from date command = %s\n", 987}, +In particular, it contains quotation marks.\n", 983}, + {"Issuing date command: %s\n", 984}, + {"Unable to run 'date' program in /bin/sh shell. popen() failed", 985}, + {"response from date command = %s\n", 986}, {"\ The date command issued by %s returned unexpected results.\n\ The command was:\n\ %s\n\ The response was:\n\ - %s\n", 988}, + %s\n", 987}, {"\ The date command issued by %s returned something other than an integer where \ the converted time value was expected.\n\ The command was:\n\ %s\n\ The response was:\n\ - %s\n", 989}, - {"date string %s equates to %d seconds since 1969.\n", 990}, + %s\n", 988}, + {"date string %s equates to %ld seconds since 1969.\n", 989}, {"\ The Hardware Clock does not contain a valid time, so we cannot set the \ -System Time from it.\n", 991}, - {"Calling settimeofday:\n", 992}, - {"\ttv.tv_sec = %ld, tv.tv_usec = %ld\n", 993}, - {"\ttz.tz_minuteswest = %d\n", 994}, - {"Not setting system clock because running in test mode.\n", 995}, - {"Must be superuser to set system clock.\n", 996}, - {"settimeofday() failed", 997}, +System Time from it.\n", 990}, + {"Calling settimeofday:\n", 991}, + {"\ttv.tv_sec = %ld, tv.tv_usec = %ld\n", 992}, + {"\ttz.tz_minuteswest = %d\n", 993}, + {"Not setting system clock because running in test mode.\n", 994}, + {"Must be superuser to set system clock.\n", 995}, + {"settimeofday() failed", 996}, {"\ Not adjusting drift factor because the Hardware Clock previously contained \ -garbage.\n", 998}, +garbage.\n", 997}, {"\ Not adjusting drift factor because it has been less than a day since the \ -last calibration.\n", 999}, +last calibration.\n", 998}, {"\ Clock drifted %d seconds in the past %d seconds in spite of a drift factor \ of %f seconds/day.\n\ -Adjusting drift factor by %f seconds/day\n", 1000}, - {"Time since last adjustment is %d seconds\n", 1001}, - {"Need to insert %d seconds and refer time back %.6f seconds ago\n", 1002}, - {"Not updating adjtime file because of testing mode.\n", 1003}, +Adjusting drift factor by %f seconds/day\n", 999}, + {"Time since last adjustment is %d seconds\n", 1000}, + {"Need to insert %d seconds and refer time back %.6f seconds ago\n", 1001}, + {"Not updating adjtime file because of testing mode.\n", 1002}, {"\ Would have written the following to %s:\n\ -%s", 1004}, - {"Drift adjustment parameters not updated.\n", 1005}, +%s", 1003}, + {"Drift adjustment parameters not updated.\n", 1004}, {"\ -The Hardware Clock does not contain a valid time, so we cannot adjust it.\n", 1006}, - {"Needed adjustment is less than one second, so not setting clock.\n", 1007}, - {"Using %s.\n", 1008}, - {"No usable clock interface found.\n", 1009}, - {"Unable to set system clock.\n", 1010}, +The Hardware Clock does not contain a valid time, so we cannot adjust it.\n", 1005}, + {"Needed adjustment is less than one second, so not setting clock.\n", 1006}, + {"Using %s.\n", 1007}, + {"No usable clock interface found.\n", 1008}, + {"Unable to set system clock.\n", 1009}, {"\ The kernel keeps an epoch value for the Hardware Clock only on an Alpha \ machine.\n\ This copy of hwclock was built for a machine other than Alpha\n\ -(and thus is presumably not running on an Alpha now). No action taken.\n", 1011}, - {"Unable to get the epoch value from the kernel.\n", 1012}, - {"Kernel is assuming an epoch value of %lu\n", 1013}, +(and thus is presumably not running on an Alpha now). No action taken.\n", 1010}, + {"Unable to get the epoch value from the kernel.\n", 1011}, + {"Kernel is assuming an epoch value of %lu\n", 1012}, {"\ To set the epoch value, you must use the 'epoch' option to tell to what \ -value to set it.\n", 1014}, - {"Not setting the epoch to %d - testing only.\n", 1015}, - {"Unable to set the epoch value in the kernel.\n", 1016}, +value to set it.\n", 1013}, + {"Not setting the epoch to %d - testing only.\n", 1014}, + {"Unable to set the epoch value in the kernel.\n", 1015}, {"\ hwclock - query and set the hardware clock (RTC)\n\ \n\ @@ -1380,544 +1387,550 @@ Options: \n\ --badyear ignore rtc's year because the bios is broken\n\ --date specifies the time to which to set the hardware clock\n\ --epoch=year specifies the year which is the beginning of the \n\ - hardware clock's epoch value\n", 1017}, + hardware clock's epoch value\n\ + --noadjfile do not access /etc/adjtime. Requires the use of\n\ + either --utc or --localtime\n", 1016}, {"\ --jensen, --arc, --srm, --funky-toy\n\ - tell hwclock the type of alpha you have (see hwclock(8))\n", 1018}, - {"%s takes no non-option arguments. You supplied %d.\n", 1019}, + tell hwclock the type of alpha you have (see hwclock(8))\n", 1017}, + {"%s takes no non-option arguments. You supplied %d.\n", 1018}, {"\ You have specified multiple function options.\n\ -You can only perform one function at a time.\n", 1020}, +You can only perform one function at a time.\n", 1019}, {"\ %s: The --utc and --localtime options are mutually exclusive. You specified \ -both.\n", 1021}, - {"No usable set-to time. Cannot set clock.\n", 1022}, - {"Sorry, only the superuser can change the Hardware Clock.\n", 1023}, - {"Sorry, only the superuser can change the System Clock.\n", 1024}, +both.\n", 1020}, + {"\ +%s: The --adjust and --noadjfile options are mutually exclusive. You \ +specified both.\n", 1021}, + {"%s: With --noadjfile, you must specify either --utc or --localtime\n", 1022}, + {"No usable set-to time. Cannot set clock.\n", 1023}, + {"Sorry, only the superuser can change the Hardware Clock.\n", 1024}, + {"Sorry, only the superuser can change the System Clock.\n", 1025}, {"\ Sorry, only the superuser can change the Hardware Clock epoch in the \ -kernel.\n", 1025}, - {"Cannot access the Hardware Clock via any known method.\n", 1026}, +kernel.\n", 1026}, + {"Cannot access the Hardware Clock via any known method.\n", 1027}, {"\ Use the --debug option to see the details of our search for an access \ -method.\n", 1027}, - {"Waiting in loop for time from KDGHWCLK to change\n", 1028}, - {"KDGHWCLK ioctl to read time failed", 1029}, - {"Timed out waiting for time change.\n", 1030}, - {"KDGHWCLK ioctl to read time failed in loop", 1031}, - {"ioctl() failed to read time from /dev/tty1", 1032}, - {"ioctl KDSHWCLK failed", 1033}, - {"KDGHWCLK ioctl failed", 1034}, - {"Can't open /dev/tty1", 1035}, - {"ioctl() to %s to read the time failed.\n", 1036}, - {"Waiting in loop for time from %s to change\n", 1037}, - {"open() of %s failed", 1038}, - {"%s does not have interrupt functions. ", 1039}, - {"read() to %s to wait for clock tick failed", 1040}, - {"ioctl() to %s to turn off update interrupts failed", 1041}, - {"ioctl() to %s to turn on update interrupts failed unexpectedly", 1042}, - {"Unable to open %s", 1043}, - {"ioctl() to %s to set the time failed.\n", 1044}, - {"ioctl(%s) was successful.\n", 1045}, - {"Open of %s failed", 1046}, +method.\n", 1028}, + {"Waiting in loop for time from KDGHWCLK to change\n", 1029}, + {"KDGHWCLK ioctl to read time failed", 1030}, + {"Timed out waiting for time change.\n", 1031}, + {"KDGHWCLK ioctl to read time failed in loop", 1032}, + {"ioctl() failed to read time from %s", 1033}, + {"ioctl KDSHWCLK failed", 1034}, + {"Can't open /dev/tty1 or /dev/vc/1", 1035}, + {"KDGHWCLK ioctl failed", 1036}, + {"ioctl() to %s to read the time failed.\n", 1037}, + {"Waiting in loop for time from %s to change\n", 1038}, + {"open() of %s failed", 1039}, + {"%s does not have interrupt functions. ", 1040}, + {"read() to %s to wait for clock tick failed", 1041}, + {"ioctl() to %s to turn off update interrupts failed", 1042}, + {"ioctl() to %s to turn on update interrupts failed unexpectedly", 1043}, + {"Unable to open %s", 1044}, + {"ioctl() to %s to set the time failed.\n", 1045}, + {"ioctl(%s) was successful.\n", 1046}, + {"Open of %s failed", 1047}, {"\ To manipulate the epoch value in the kernel, we must access the Linux 'rtc' \ device driver via the device special file %s. This file does not exist on \ -this system.\n", 1047}, - {"ioctl(RTC_EPOCH_READ) to %s failed", 1048}, - {"we have read epoch %ld from %s with RTC_EPOCH_READ ioctl.\n", 1049}, - {"The epoch value may not be less than 1900. You requested %ld\n", 1050}, - {"setting epoch to %ld with RTC_EPOCH_SET ioctl to %s.\n", 1051}, - {"\ -The kernel device driver for %s does not have the RTC_EPOCH_SET ioctl.\n", 1052}, - {"ioctl(RTC_EPOCH_SET) to %s failed", 1053}, - {"invalid number `%s'\n", 1054}, - {"number `%s' to `%s' out of range\n", 1055}, - {"unrecognized option `%s'\n", 1056}, - {"option `%s' requires an argument\n", 1057}, - {"option `%s' doesn't allow an argument\n", 1058}, - {"unrecognized option `-%c'\n", 1059}, - {"calling open_tty\n", 1060}, - {"calling termio_init\n", 1061}, - {"writing init string\n", 1062}, - {"before autobaud\n", 1063}, - {"waiting for cr-lf\n", 1064}, - {"read %c\n", 1065}, - {"reading login name\n", 1066}, - {"%s: can't exec %s: %m", 1067}, - {"can't malloc initstring", 1068}, - {"bad timeout value: %s", 1069}, - {"after getopt loop\n", 1070}, - {"exiting parseargs\n", 1071}, - {"entered parse_speeds\n", 1072}, - {"bad speed: %s", 1073}, - {"too many alternate speeds", 1074}, - {"exiting parsespeeds\n", 1075}, - {"/dev: chdir() failed: %m", 1076}, - {"/dev/%s: not a character device", 1077}, - {"open(2)\n", 1078}, - {"/dev/%s: cannot open as standard input: %m", 1079}, - {"%s: not open for read/write", 1080}, - {"duping\n", 1081}, - {"%s: dup problem: %m", 1082}, - {"term_io 2\n", 1083}, - {"user", 1084}, - {"users", 1085}, - {"%s: read: %m", 1086}, - {"%s: input overrun", 1087}, +this system.\n", 1048}, + {"ioctl(RTC_EPOCH_READ) to %s failed", 1049}, + {"we have read epoch %ld from %s with RTC_EPOCH_READ ioctl.\n", 1050}, + {"The epoch value may not be less than 1900. You requested %ld\n", 1051}, + {"setting epoch to %ld with RTC_EPOCH_SET ioctl to %s.\n", 1052}, + {"\ +The kernel device driver for %s does not have the RTC_EPOCH_SET ioctl.\n", 1053}, + {"ioctl(RTC_EPOCH_SET) to %s failed", 1054}, + {"invalid number `%s'\n", 1055}, + {"number `%s' to `%s' out of range\n", 1056}, + {"unrecognized option `%s'\n", 1057}, + {"option `%s' requires an argument\n", 1058}, + {"option `%s' doesn't allow an argument\n", 1059}, + {"unrecognized option `-%c'\n", 1060}, + {"calling open_tty\n", 1061}, + {"calling termio_init\n", 1062}, + {"writing init string\n", 1063}, + {"before autobaud\n", 1064}, + {"waiting for cr-lf\n", 1065}, + {"read %c\n", 1066}, + {"reading login name\n", 1067}, + {"%s: can't exec %s: %m", 1068}, + {"can't malloc initstring", 1069}, + {"bad timeout value: %s", 1070}, + {"after getopt loop\n", 1071}, + {"exiting parseargs\n", 1072}, + {"entered parse_speeds\n", 1073}, + {"bad speed: %s", 1074}, + {"too many alternate speeds", 1075}, + {"exiting parsespeeds\n", 1076}, + {"/dev: chdir() failed: %m", 1077}, + {"/dev/%s: not a character device", 1078}, + {"open(2)\n", 1079}, + {"/dev/%s: cannot open as standard input: %m", 1080}, + {"%s: not open for read/write", 1081}, + {"duping\n", 1082}, + {"%s: dup problem: %m", 1083}, + {"term_io 2\n", 1084}, + {"user", 1085}, + {"users", 1086}, + {"%s: read: %m", 1087}, + {"%s: input overrun", 1088}, {"\ Usage: %s [-hiLmw] [-l login_program] [-t timeout] [-I initstring] [-H \ login_host] baud_rate,... line [termtype]\n\ or\t[-hiLmw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] \ -line baud_rate,... [termtype]\n", 1088}, - {"login: memory low, login may fail\n", 1089}, - {"can't malloc for ttyclass", 1090}, - {"can't malloc for grplist", 1091}, - {"Login on %s from %s denied by default.\n", 1092}, - {"Login on %s from %s denied.\n", 1093}, - {"%s: you (user %d) don't exist.\n", 1094}, - {"%s: user \"%s\" does not exist.\n", 1095}, - {"%s: can only change local entries; use yp%s instead.\n", 1096}, - {"Changing finger information for %s.\n", 1097}, - {"Password error.", 1098}, - {"Password: ", 1099}, - {"Incorrect password.", 1100}, - {"Finger information not changed.\n", 1101}, - {"Usage: %s [ -f full-name ] [ -o office ] ", 1102}, +line baud_rate,... [termtype]\n", 1089}, + {"login: memory low, login may fail\n", 1090}, + {"can't malloc for ttyclass", 1091}, + {"can't malloc for grplist", 1092}, + {"Login on %s from %s denied by default.\n", 1093}, + {"Login on %s from %s denied.\n", 1094}, + {"%s: you (user %d) don't exist.\n", 1095}, + {"%s: user \"%s\" does not exist.\n", 1096}, + {"%s: can only change local entries; use yp%s instead.\n", 1097}, + {"Changing finger information for %s.\n", 1098}, + {"Password error.", 1099}, + {"Password: ", 1100}, + {"Incorrect password.", 1101}, + {"Finger information not changed.\n", 1102}, + {"Usage: %s [ -f full-name ] [ -o office ] ", 1103}, {"\ [ -p office-phone ]\n\ -\t[ -h home-phone ] ", 1103}, - {"[ --help ] [ --version ]\n", 1104}, +\t[ -h home-phone ] ", 1104}, + {"[ --help ] [ --version ]\n", 1105}, {"\ \n\ -Aborted.\n", 1105}, - {"field is too long.\n", 1106}, - {"'%c' is not allowed.\n", 1107}, - {"Control characters are not allowed.\n", 1108}, - {"Finger information *NOT* changed. Try again later.\n", 1109}, - {"Finger information changed.\n", 1110}, - {"malloc failed", 1111}, - {"%s: Your shell is not in /etc/shells, shell change denied\n", 1112}, - {"Changing shell for %s.\n", 1113}, - {"New shell", 1114}, - {"Shell not changed.\n", 1115}, - {"Shell *NOT* changed. Try again later.\n", 1116}, - {"Shell changed.\n", 1117}, - {"Usage: %s [ -s shell ] ", 1118}, - {"[ --list-shells ] [ --help ] [ --version ]\n", 1119}, - {" [ username ]\n", 1120}, - {"%s: shell must be a full path name.\n", 1121}, - {"%s: \"%s\" does not exist.\n", 1122}, - {"%s: \"%s\" is not executable.\n", 1123}, - {"%s: '%c' is not allowed.\n", 1124}, - {"%s: Control characters are not allowed.\n", 1125}, - {"Warning: \"%s\" is not listed in /etc/shells\n", 1126}, - {"%s: \"%s\" is not listed in /etc/shells.\n", 1127}, - {"%s: use -l option to see list\n", 1128}, - {"Warning: \"%s\" is not listed in /etc/shells.\n", 1129}, - {"Use %s -l to see list.\n", 1130}, - {"No known shells.\n", 1131}, - {"couldn't open /dev/urandom", 1132}, - {"couldn't read random data from /dev/urandom", 1133}, - {"can't open %s for reading", 1134}, - {"can't stat(%s)", 1135}, - {"%s doesn't have the correct filemodes", 1136}, - {"can't read data from %s", 1137}, - {"Can't read %s, exiting.", 1138}, - {"usage: last [-#] [-f file] [-t tty] [-h hostname] [user ...]\n", 1139}, - {" still logged in", 1140}, +Aborted.\n", 1106}, + {"field is too long.\n", 1107}, + {"'%c' is not allowed.\n", 1108}, + {"Control characters are not allowed.\n", 1109}, + {"Finger information *NOT* changed. Try again later.\n", 1110}, + {"Finger information changed.\n", 1111}, + {"malloc failed", 1112}, + {"%s: Your shell is not in /etc/shells, shell change denied\n", 1113}, + {"Changing shell for %s.\n", 1114}, + {"New shell", 1115}, + {"Shell not changed.\n", 1116}, + {"Shell *NOT* changed. Try again later.\n", 1117}, + {"Shell changed.\n", 1118}, + {"\ +Usage: %s [ -s shell ] [ --list-shells ] [ --help ] [ --version ]\n\ + [ username ]\n", 1119}, + {"%s: shell must be a full path name.\n", 1120}, + {"%s: \"%s\" does not exist.\n", 1121}, + {"%s: \"%s\" is not executable.\n", 1122}, + {"%s: '%c' is not allowed.\n", 1123}, + {"%s: Control characters are not allowed.\n", 1124}, + {"Warning: \"%s\" is not listed in /etc/shells\n", 1125}, + {"%s: \"%s\" is not listed in /etc/shells.\n", 1126}, + {"%s: use -l option to see list\n", 1127}, + {"Warning: \"%s\" is not listed in /etc/shells.\n", 1128}, + {"Use %s -l to see list.\n", 1129}, + {"No known shells.\n", 1130}, + {"couldn't open /dev/urandom", 1131}, + {"couldn't read random data from /dev/urandom", 1132}, + {"can't open %s for reading", 1133}, + {"can't stat(%s)", 1134}, + {"%s doesn't have the correct filemodes", 1135}, + {"can't read data from %s", 1136}, + {"Can't read %s, exiting.", 1137}, + {"usage: last [-#] [-f file] [-t tty] [-h hostname] [user ...]\n", 1138}, + {" still logged in", 1139}, {"\ \n\ -wtmp begins %s", 1141}, - {"last: malloc failure.\n", 1142}, - {"last: gethostname", 1143}, +wtmp begins %s", 1140}, + {"last: malloc failure.\n", 1141}, + {"last: gethostname", 1142}, {"\ \n\ -interrupted %10.10s %5.5s \n", 1144}, - {"login: -h for super-user only.\n", 1145}, - {"usage: login [-fp] [username]\n", 1146}, - {"login: PAM Failure, aborting: %s\n", 1147}, - {"Couldn't initialize PAM: %s", 1148}, - {"login: ", 1149}, - {"FAILED LOGIN %d FROM %s FOR %s, %s", 1150}, +interrupted %10.10s %5.5s \n", 1143}, + {"login: -h for super-user only.\n", 1144}, + {"usage: login [-fp] [username]\n", 1145}, + {"login: PAM Failure, aborting: %s\n", 1146}, + {"Couldn't initialize PAM: %s", 1147}, + {"login: ", 1148}, + {"FAILED LOGIN %d FROM %s FOR %s, %s", 1149}, {"\ Login incorrect\n\ -\n", 1151}, - {"TOO MANY LOGIN TRIES (%d) FROM %s FOR %s, %s", 1152}, - {"FAILED LOGIN SESSION FROM %s FOR %s, %s", 1153}, +\n", 1150}, + {"TOO MANY LOGIN TRIES (%d) FROM %s FOR %s, %s", 1151}, + {"FAILED LOGIN SESSION FROM %s FOR %s, %s", 1152}, {"\ \n\ -Login incorrect\n", 1154}, - {"Illegal username", 1155}, - {"%s login refused on this terminal.\n", 1156}, - {"LOGIN %s REFUSED FROM %s ON TTY %s", 1157}, - {"LOGIN %s REFUSED ON TTY %s", 1158}, - {"Login incorrect\n", 1159}, +Login incorrect\n", 1153}, + {"Illegal username", 1154}, + {"%s login refused on this terminal.\n", 1155}, + {"LOGIN %s REFUSED FROM %s ON TTY %s", 1156}, + {"LOGIN %s REFUSED ON TTY %s", 1157}, + {"Login incorrect\n", 1158}, {"\ Too many users logged on already.\n\ -Try again later.\n", 1160}, - {"You have too many processes running.\n", 1161}, - {"DIALUP AT %s BY %s", 1162}, - {"ROOT LOGIN ON %s FROM %s", 1163}, - {"ROOT LOGIN ON %s", 1164}, - {"LOGIN ON %s BY %s FROM %s", 1165}, - {"LOGIN ON %s BY %s", 1166}, - {"You have %smail.\n", 1167}, - {"new ", 1168}, - {"login: failure forking: %s", 1169}, - {"setuid() failed", 1170}, - {"No directory %s!\n", 1171}, - {"Logging in with home = \"/\".\n", 1172}, - {"login: no memory for shell script.\n", 1173}, - {"login: couldn't exec shell script: %s.\n", 1174}, - {"login: no shell: %s.\n", 1175}, +Try again later.\n", 1159}, + {"You have too many processes running.\n", 1160}, + {"DIALUP AT %s BY %s", 1161}, + {"ROOT LOGIN ON %s FROM %s", 1162}, + {"ROOT LOGIN ON %s", 1163}, + {"LOGIN ON %s BY %s FROM %s", 1164}, + {"LOGIN ON %s BY %s", 1165}, + {"You have %smail.\n", 1166}, + {"new ", 1167}, + {"login: failure forking: %s", 1168}, + {"setuid() failed", 1169}, + {"No directory %s!\n", 1170}, + {"Logging in with home = \"/\".\n", 1171}, + {"login: no memory for shell script.\n", 1172}, + {"login: couldn't exec shell script: %s.\n", 1173}, + {"login: no shell: %s.\n", 1174}, {"\ \n\ -%s login: ", 1176}, - {"login name much too long.\n", 1177}, - {"NAME too long", 1178}, - {"login names may not start with '-'.\n", 1179}, - {"too many bare linefeeds.\n", 1180}, - {"EXCESSIVE linefeeds", 1181}, - {"Login timed out after %d seconds\n", 1182}, - {"Last login: %.*s ", 1183}, - {"from %.*s\n", 1184}, - {"on %.*s\n", 1185}, - {"LOGIN FAILURE FROM %s, %s", 1186}, - {"LOGIN FAILURE ON %s, %s", 1187}, - {"%d LOGIN FAILURES FROM %s, %s", 1188}, - {"%d LOGIN FAILURES ON %s, %s", 1189}, - {"is y\n", 1190}, - {"is n\n", 1191}, - {"usage: mesg [y | n]\n", 1192}, - {"newgrp: Who are you?", 1193}, - {"newgrp: setgid", 1194}, - {"newgrp: No such group.", 1195}, - {"newgrp: Permission denied", 1196}, - {"newgrp: setuid", 1197}, - {"No shell", 1198}, - {"The password must have at least 6 characters, try again.\n", 1199}, - {"The password must contain characters out of two of the following\n", 1200}, - {"classes: upper and lower case letters, digits and non alphanumeric\n", 1201}, - {"characters. See passwd(1) for more information.\n", 1202}, - {"You cannot reuse the old password.\n", 1203}, - {"Please don't use something like your username as password!\n", 1204}, - {"Please don't use something like your realname as password!\n", 1205}, - {"Usage: passwd [username [password]]\n", 1206}, - {"Only root may use the one and two argument forms.\n", 1207}, - {"Usage: passwd [-foqsvV] [user [password]]\n", 1208}, - {"Can't exec %s: %s\n", 1209}, - {"Cannot find login name", 1210}, - {"Only root can change the password for others.\n", 1211}, - {"Too many arguments.\n", 1212}, - {"Can't find username anywhere. Is `%s' really a user?", 1213}, - {"Sorry, I can only change local passwords. Use yppasswd instead.", 1214}, - {"UID and username does not match, imposter!", 1215}, - {"Changing password for %s\n", 1216}, - {"Enter old password: ", 1217}, - {"Illegal password, imposter.", 1218}, - {"Enter new password: ", 1219}, - {"Password not changed.", 1220}, - {"Re-type new password: ", 1221}, - {"You misspelled it. Password not changed.", 1222}, - {"password changed, user %s", 1223}, - {"ROOT PASSWORD CHANGED", 1224}, - {"password changed by root, user %s", 1225}, - {"calling setpwnam to set password.\n", 1226}, - {"Password *NOT* changed. Try again later.\n", 1227}, - {"Password changed.\n", 1228}, - {"Usage: shutdown [-h|-r] [-fqs] [now|hh:ss|+mins]\n", 1229}, - {"Shutdown process aborted", 1230}, - {"%s: Only root can shut a system down.\n", 1231}, - {"That must be tomorrow, can't you wait till then?\n", 1232}, - {"for maintenance; bounce, bounce", 1233}, - {"timeout = %d, quiet = %d, reboot = %d\n", 1234}, - {"The system is being shut down within 5 minutes", 1235}, - {"Login is therefore prohibited.", 1236}, - {"%s by %s: %s", 1237}, - {"rebooted", 1238}, - {"halted", 1239}, +%s login: ", 1175}, + {"login name much too long.\n", 1176}, + {"NAME too long", 1177}, + {"login names may not start with '-'.\n", 1178}, + {"too many bare linefeeds.\n", 1179}, + {"EXCESSIVE linefeeds", 1180}, + {"Login timed out after %d seconds\n", 1181}, + {"Last login: %.*s ", 1182}, + {"from %.*s\n", 1183}, + {"on %.*s\n", 1184}, + {"LOGIN FAILURE FROM %s, %s", 1185}, + {"LOGIN FAILURE ON %s, %s", 1186}, + {"%d LOGIN FAILURES FROM %s, %s", 1187}, + {"%d LOGIN FAILURES ON %s, %s", 1188}, + {"is y\n", 1189}, + {"is n\n", 1190}, + {"usage: mesg [y | n]\n", 1191}, + {"newgrp: Who are you?", 1192}, + {"newgrp: setgid", 1193}, + {"newgrp: No such group.", 1194}, + {"newgrp: Permission denied", 1195}, + {"newgrp: setuid", 1196}, + {"No shell", 1197}, + {"The password must have at least 6 characters, try again.\n", 1198}, + {"The password must contain characters out of two of the following\n", 1199}, + {"classes: upper and lower case letters, digits and non alphanumeric\n", 1200}, + {"characters. See passwd(1) for more information.\n", 1201}, + {"You cannot reuse the old password.\n", 1202}, + {"Please don't use something like your username as password!\n", 1203}, + {"Please don't use something like your realname as password!\n", 1204}, + {"Usage: passwd [username [password]]\n", 1205}, + {"Only root may use the one and two argument forms.\n", 1206}, + {"Usage: passwd [-foqsvV] [user [password]]\n", 1207}, + {"Can't exec %s: %s\n", 1208}, + {"Cannot find login name", 1209}, + {"Only root can change the password for others.\n", 1210}, + {"Too many arguments.\n", 1211}, + {"Can't find username anywhere. Is `%s' really a user?", 1212}, + {"Sorry, I can only change local passwords. Use yppasswd instead.", 1213}, + {"UID and username does not match, imposter!", 1214}, + {"Changing password for %s\n", 1215}, + {"Enter old password: ", 1216}, + {"Illegal password, imposter.", 1217}, + {"Enter new password: ", 1218}, + {"Password not changed.", 1219}, + {"Re-type new password: ", 1220}, + {"You misspelled it. Password not changed.", 1221}, + {"password changed, user %s", 1222}, + {"ROOT PASSWORD CHANGED", 1223}, + {"password changed by root, user %s", 1224}, + {"calling setpwnam to set password.\n", 1225}, + {"Password *NOT* changed. Try again later.\n", 1226}, + {"Password changed.\n", 1227}, + {"Usage: shutdown [-h|-r] [-fqs] [now|hh:ss|+mins]\n", 1228}, + {"Shutdown process aborted", 1229}, + {"%s: Only root can shut a system down.\n", 1230}, + {"That must be tomorrow, can't you wait till then?\n", 1231}, + {"for maintenance; bounce, bounce", 1232}, + {"timeout = %d, quiet = %d, reboot = %d\n", 1233}, + {"The system is being shut down within 5 minutes", 1234}, + {"Login is therefore prohibited.", 1235}, + {"%s by %s: %s", 1236}, + {"rebooted", 1237}, + {"halted", 1238}, {"\ \n\ -Why am I still alive after reboot?", 1240}, +Why am I still alive after reboot?", 1239}, {"\ \n\ -Now you can turn off the power...", 1241}, - {"Calling kernel power-off facility...\n", 1242}, - {"Error powering off\t%s\n", 1243}, - {"Executing the program \"%s\" ...\n", 1244}, - {"Error executing\t%s\n", 1245}, - {"URGENT: broadcast message from %s:", 1246}, - {"System going down in %d hours %d minutes", 1247}, - {"System going down in 1 hour %d minutes", 1248}, - {"System going down in %d minutes\n", 1249}, - {"System going down in 1 minute\n", 1250}, - {"System going down IMMEDIATELY!\n", 1251}, - {"\t... %s ...\n", 1252}, - {"Cannot fork for swapoff. Shrug!", 1253}, - {"Cannot exec swapoff, hoping umount will do the trick.", 1254}, - {"Cannot fork for umount, trying manually.", 1255}, - {"Cannot exec %s, trying umount.\n", 1256}, - {"Cannot exec umount, giving up on umount.", 1257}, - {"Unmounting any remaining filesystems...", 1258}, - {"shutdown: Couldn't umount %s: %s\n", 1259}, - {"Booting to single user mode.\n", 1260}, - {"exec of single user shell failed\n", 1261}, - {"fork of single user shell failed\n", 1262}, - {"error opening fifo\n", 1263}, - {"error running finalprog\n", 1264}, - {"error forking finalprog\n", 1265}, +Now you can turn off the power...", 1240}, + {"Calling kernel power-off facility...\n", 1241}, + {"Error powering off\t%s\n", 1242}, + {"Executing the program \"%s\" ...\n", 1243}, + {"Error executing\t%s\n", 1244}, + {"URGENT: broadcast message from %s:", 1245}, + {"System going down in %d hours %d minutes", 1246}, + {"System going down in 1 hour %d minutes", 1247}, + {"System going down in %d minutes\n", 1248}, + {"System going down in 1 minute\n", 1249}, + {"System going down IMMEDIATELY!\n", 1250}, + {"\t... %s ...\n", 1251}, + {"Cannot fork for swapoff. Shrug!", 1252}, + {"Cannot exec swapoff, hoping umount will do the trick.", 1253}, + {"Cannot fork for umount, trying manually.", 1254}, + {"Cannot exec %s, trying umount.\n", 1255}, + {"Cannot exec umount, giving up on umount.", 1256}, + {"Unmounting any remaining filesystems...", 1257}, + {"shutdown: Couldn't umount %s: %s\n", 1258}, + {"Booting to single user mode.\n", 1259}, + {"exec of single user shell failed\n", 1260}, + {"fork of single user shell failed\n", 1261}, + {"error opening fifo\n", 1262}, + {"error running finalprog\n", 1263}, + {"error forking finalprog\n", 1264}, {"\ \n\ -Wrong password.\n", 1266}, - {"lstat of path failed\n", 1267}, - {"stat of path failed\n", 1268}, - {"open of directory failed\n", 1269}, - {"fork failed\n", 1270}, - {"exec failed\n", 1271}, - {"cannot open inittab\n", 1272}, - {"no TERM or cannot stat tty\n", 1273}, - {"error running programme\n", 1274}, - {"too many iov's (change code in wall/ttymsg.c)", 1275}, - {"excessively long line arg", 1276}, - {"cannot fork", 1277}, - {"fork: %s", 1278}, - {"%s: BAD ERROR", 1279}, - {"%s: the %s file is busy.\n", 1280}, - {"%s: the %s file is busy (%s present)\n", 1281}, - {"%s: can't link %s: %s\n", 1282}, - {"%s: can't unlock %s: %s (your changes are still in %s)\n", 1283}, - {"%s: Cannot fork\n", 1284}, - {"%s: %s unchanged\n", 1285}, - {"%s: no changes made\n", 1286}, - {"You are using shadow groups on this system.\n", 1287}, - {"You are using shadow passwords on this system.\n", 1288}, - {"Would you like to edit %s now [y/n]? ", 1289}, - {"usage: %s [file]\n", 1290}, - {"%s: can't open temporary file.\n", 1291}, - {"Broadcast Message from %s@%s", 1292}, - {"%s: will not read %s - use stdin.\n", 1293}, - {"%s: can't read %s.\n", 1294}, - {"%s: can't stat temporary file.\n", 1295}, - {"%s: can't read temporary file.\n", 1296}, - {"illegal month value: use 1-12", 1297}, - {"illegal year value: use 1-9999", 1298}, - {"usage: cal [-mjyV] [[month] year]\n", 1299}, - {"usage: %s [+format] [day month year]\n", 1300}, - {"St. Tib's Day", 1301}, - {"%s: unknown signal %s\n", 1302}, - {"%s: can't find process \"%s\"\n", 1303}, - {"%s: unknown signal %s; valid signals:\n", 1304}, - {"usage: %s [ -s signal | -p ] [ -a ] pid ...\n", 1305}, - {" %s -l [ signal ]\n", 1306}, - {"logger: %s: %s.\n", 1307}, - {"logger: unknown facility name: %s.\n", 1308}, - {"logger: unknown priority name: %s.\n", 1309}, - {"\ -usage: logger [-is] [-f file] [-p pri] [-t tag] [-u socket] [ message ... ]\n", 1310}, - {"usage: look [-dfa] [-t char] string [file]\n", 1311}, - {"Could not open %s\n", 1312}, - {"Got %d bytes from %s\n", 1313}, - {"namei: unable to get current directory - %s\n", 1314}, - {"namei: unable to chdir to %s - %s (%d)\n", 1315}, - {"usage: namei [-mx] pathname [pathname ...]\n", 1316}, - {"namei: could not chdir to root!\n", 1317}, - {"namei: could not stat root!\n", 1318}, - {" ? could not chdir into %s - %s (%d)\n", 1319}, - {" ? problems reading symlink %s - %s (%d)\n", 1320}, - {" *** EXCEEDED UNIX LIMIT OF SYMLINKS ***\n", 1321}, - {"namei: unknown file type 0%06o on file %s\n", 1322}, - {"%s: out of memory\n", 1323}, - {"%s: renaming %s to %s failed: %s\n", 1324}, - {"call: %s from to files...\n", 1325}, +Wrong password.\n", 1265}, + {"lstat of path failed\n", 1266}, + {"stat of path failed\n", 1267}, + {"open of directory failed\n", 1268}, + {"fork failed\n", 1269}, + {"exec failed\n", 1270}, + {"cannot open inittab\n", 1271}, + {"no TERM or cannot stat tty\n", 1272}, + {"error stopping service: \"%s\"", 1273}, + {"too many iov's (change code in wall/ttymsg.c)", 1274}, + {"excessively long line arg", 1275}, + {"cannot fork", 1276}, + {"fork: %s", 1277}, + {"%s: BAD ERROR", 1278}, + {"%s: the %s file is busy.\n", 1279}, + {"%s: the %s file is busy (%s present)\n", 1280}, + {"%s: can't link %s: %s\n", 1281}, + {"%s: can't unlock %s: %s (your changes are still in %s)\n", 1282}, + {"%s: Cannot fork\n", 1283}, + {"%s: %s unchanged\n", 1284}, + {"%s: no changes made\n", 1285}, + {"You are using shadow groups on this system.\n", 1286}, + {"You are using shadow passwords on this system.\n", 1287}, + {"Would you like to edit %s now [y/n]? ", 1288}, + {"usage: %s [file]\n", 1289}, + {"%s: can't open temporary file.\n", 1290}, + {"Broadcast Message from %s@%s", 1291}, + {"%s: will not read %s - use stdin.\n", 1292}, + {"%s: can't read %s.\n", 1293}, + {"%s: can't stat temporary file.\n", 1294}, + {"%s: can't read temporary file.\n", 1295}, + {"illegal month value: use 1-12", 1296}, + {"illegal year value: use 1-9999", 1297}, + {"usage: cal [-mjyV] [[month] year]\n", 1298}, + {"usage: %s [+format] [day month year]\n", 1299}, + {"St. Tib's Day", 1300}, + {"%s: unknown signal %s\n", 1301}, + {"%s: can't find process \"%s\"\n", 1302}, + {"%s: unknown signal %s; valid signals:\n", 1303}, + {"usage: %s [ -s signal | -p ] [ -a ] pid ...\n", 1304}, + {" %s -l [ signal ]\n", 1305}, + {"logger: %s: %s.\n", 1306}, + {"logger: unknown facility name: %s.\n", 1307}, + {"logger: unknown priority name: %s.\n", 1308}, + {"\ +usage: logger [-is] [-f file] [-p pri] [-t tag] [-u socket] [ message ... ]\n", 1309}, + {"usage: look [-dfa] [-t char] string [file]\n", 1310}, + {"Could not open %s\n", 1311}, + {"Got %d bytes from %s\n", 1312}, + {"namei: unable to get current directory - %s\n", 1313}, + {"namei: unable to chdir to %s - %s (%d)\n", 1314}, + {"usage: namei [-mx] pathname [pathname ...]\n", 1315}, + {"namei: could not chdir to root!\n", 1316}, + {"namei: could not stat root!\n", 1317}, + {" ? could not chdir into %s - %s (%d)\n", 1318}, + {" ? problems reading symlink %s - %s (%d)\n", 1319}, + {" *** EXCEEDED UNIX LIMIT OF SYMLINKS ***\n", 1320}, + {"namei: unknown file type 0%06o on file %s\n", 1321}, + {"%s: out of memory\n", 1322}, + {"%s: renaming %s to %s failed: %s\n", 1323}, + {"call: %s from to files...\n", 1324}, {"\ Warning: `%s' is a symlink.\n\ Use `%s [options] %s' if you really want to use it.\n\ -Script not started.\n", 1326}, - {"usage: script [-a] [-f] [-q] [file]\n", 1327}, - {"Script started, file is %s\n", 1328}, - {"Script started on %s", 1329}, +Script not started.\n", 1325}, + {"usage: script [-a] [-f] [-q] [file]\n", 1326}, + {"Script started, file is %s\n", 1327}, + {"Script started on %s", 1328}, {"\ \n\ -Script done on %s", 1330}, - {"Script done, file is %s\n", 1331}, - {"openpty failed\n", 1332}, - {"Out of pty's\n", 1333}, - {"%s: Argument error, usage\n", 1334}, - {" [ -term terminal_name ]\n", 1335}, - {" [ -reset ]\n", 1336}, - {" [ -initialize ]\n", 1337}, - {" [ -cursor [on|off] ]\n", 1338}, - {" [ -snow [on|off] ]\n", 1339}, - {" [ -softscroll [on|off] ]\n", 1340}, - {" [ -repeat [on|off] ]\n", 1341}, - {" [ -appcursorkeys [on|off] ]\n", 1342}, - {" [ -linewrap [on|off] ]\n", 1343}, - {" [ -default ]\n", 1344}, - {" [ -foreground black|blue|green|cyan", 1345}, - {"|red|magenta|yellow|white|default ]\n", 1346}, - {" [ -background black|blue|green|cyan", 1347}, - {" [ -ulcolor black|grey|blue|green|cyan", 1348}, - {"|red|magenta|yellow|white ]\n", 1349}, - {" [ -ulcolor bright blue|green|cyan", 1350}, - {" [ -hbcolor black|grey|blue|green|cyan", 1351}, - {" [ -hbcolor bright blue|green|cyan", 1352}, - {" [ -standout [ attr ] ]\n", 1353}, - {" [ -inversescreen [on|off] ]\n", 1354}, - {" [ -bold [on|off] ]\n", 1355}, - {" [ -half-bright [on|off] ]\n", 1356}, - {" [ -blink [on|off] ]\n", 1357}, - {" [ -reverse [on|off] ]\n", 1358}, - {" [ -underline [on|off] ]\n", 1359}, - {" [ -store ]\n", 1360}, - {" [ -clear [all|rest] ]\n", 1361}, - {" [ -tabs [ tab1 tab2 tab3 ... ] ] (tabn = 1-160)\n", 1362}, - {" [ -clrtabs [ tab1 tab2 tab3 ... ] ] (tabn = 1-160)\n", 1363}, - {" [ -regtabs [1-160] ]\n", 1364}, - {" [ -blank [0-60] ]\n", 1365}, - {" [ -dump [1-NR_CONSOLES] ]\n", 1366}, - {" [ -append [1-NR_CONSOLES] ]\n", 1367}, - {" [ -file dumpfilename ]\n", 1368}, - {" [ -msg [on|off] ]\n", 1369}, - {" [ -msglevel [0-8] ]\n", 1370}, - {" [ -powersave [on|vsync|hsync|powerdown|off] ]\n", 1371}, - {" [ -powerdown [0-60] ]\n", 1372}, - {" [ -blength [0-2000] ]\n", 1373}, - {" [ -bfreq freqnumber ]\n", 1374}, - {"cannot (un)set powersave mode\n", 1375}, - {"klogctl error: %s\n", 1376}, - {"Error reading %s\n", 1377}, - {"Error writing screendump\n", 1378}, - {"couldn't read %s, and cannot ioctl dump\n", 1379}, - {"%s: $TERM is not defined.\n", 1380}, - {"whereis [ -sbmu ] [ -SBM dir ... -f ] name...\n", 1381}, - {"write: can't find your tty's name\n", 1382}, - {"write: you have write permission turned off.\n", 1383}, - {"write: %s is not logged in on %s.\n", 1384}, - {"write: %s has messages disabled on %s\n", 1385}, - {"usage: write user [tty]\n", 1386}, - {"write: %s is not logged in\n", 1387}, - {"write: %s has messages disabled\n", 1388}, - {"write: %s is logged in more than once; writing to %s\n", 1389}, - {"Message from %s@%s (as %s) on %s at %s ...", 1390}, - {"Message from %s@%s on %s at %s ...", 1391}, - {"warning: error reading %s: %s", 1392}, - {"warning: can't open %s: %s", 1393}, - {"mount: could not open %s - using %s instead\n", 1394}, - {"can't create lock file %s: %s (use -n flag to override)", 1395}, - {"can't link lock file %s: %s (use -n flag to override)", 1396}, - {"can't open lock file %s: %s (use -n flag to override)", 1397}, - {"Can't lock lock file %s: %s\n", 1398}, - {"can't lock lock file %s: %s", 1399}, - {"timed out", 1400}, +Script done on %s", 1329}, + {"Script done, file is %s\n", 1330}, + {"openpty failed\n", 1331}, + {"Out of pty's\n", 1332}, + {"%s: Argument error, usage\n", 1333}, + {" [ -term terminal_name ]\n", 1334}, + {" [ -reset ]\n", 1335}, + {" [ -initialize ]\n", 1336}, + {" [ -cursor [on|off] ]\n", 1337}, + {" [ -snow [on|off] ]\n", 1338}, + {" [ -softscroll [on|off] ]\n", 1339}, + {" [ -repeat [on|off] ]\n", 1340}, + {" [ -appcursorkeys [on|off] ]\n", 1341}, + {" [ -linewrap [on|off] ]\n", 1342}, + {" [ -default ]\n", 1343}, + {" [ -foreground black|blue|green|cyan", 1344}, + {"|red|magenta|yellow|white|default ]\n", 1345}, + {" [ -background black|blue|green|cyan", 1346}, + {" [ -ulcolor black|grey|blue|green|cyan", 1347}, + {"|red|magenta|yellow|white ]\n", 1348}, + {" [ -ulcolor bright blue|green|cyan", 1349}, + {" [ -hbcolor black|grey|blue|green|cyan", 1350}, + {" [ -hbcolor bright blue|green|cyan", 1351}, + {" [ -standout [ attr ] ]\n", 1352}, + {" [ -inversescreen [on|off] ]\n", 1353}, + {" [ -bold [on|off] ]\n", 1354}, + {" [ -half-bright [on|off] ]\n", 1355}, + {" [ -blink [on|off] ]\n", 1356}, + {" [ -reverse [on|off] ]\n", 1357}, + {" [ -underline [on|off] ]\n", 1358}, + {" [ -store ]\n", 1359}, + {" [ -clear [all|rest] ]\n", 1360}, + {" [ -tabs [ tab1 tab2 tab3 ... ] ] (tabn = 1-160)\n", 1361}, + {" [ -clrtabs [ tab1 tab2 tab3 ... ] ] (tabn = 1-160)\n", 1362}, + {" [ -regtabs [1-160] ]\n", 1363}, + {" [ -blank [0-60] ]\n", 1364}, + {" [ -dump [1-NR_CONSOLES] ]\n", 1365}, + {" [ -append [1-NR_CONSOLES] ]\n", 1366}, + {" [ -file dumpfilename ]\n", 1367}, + {" [ -msg [on|off] ]\n", 1368}, + {" [ -msglevel [0-8] ]\n", 1369}, + {" [ -powersave [on|vsync|hsync|powerdown|off] ]\n", 1370}, + {" [ -powerdown [0-60] ]\n", 1371}, + {" [ -blength [0-2000] ]\n", 1372}, + {" [ -bfreq freqnumber ]\n", 1373}, + {"cannot (un)set powersave mode\n", 1374}, + {"klogctl error: %s\n", 1375}, + {"Error reading %s\n", 1376}, + {"Error writing screendump\n", 1377}, + {"couldn't read %s, and cannot ioctl dump\n", 1378}, + {"%s: $TERM is not defined.\n", 1379}, + {"whereis [ -sbmu ] [ -SBM dir ... -f ] name...\n", 1380}, + {"write: can't find your tty's name\n", 1381}, + {"write: you have write permission turned off.\n", 1382}, + {"write: %s is not logged in on %s.\n", 1383}, + {"write: %s has messages disabled on %s\n", 1384}, + {"usage: write user [tty]\n", 1385}, + {"write: %s is not logged in\n", 1386}, + {"write: %s has messages disabled\n", 1387}, + {"write: %s is logged in more than once; writing to %s\n", 1388}, + {"Message from %s@%s (as %s) on %s at %s ...", 1389}, + {"Message from %s@%s on %s at %s ...", 1390}, + {"warning: error reading %s: %s", 1391}, + {"warning: can't open %s: %s", 1392}, + {"mount: could not open %s - using %s instead\n", 1393}, + {"can't create lock file %s: %s (use -n flag to override)", 1394}, + {"can't link lock file %s: %s (use -n flag to override)", 1395}, + {"can't open lock file %s: %s (use -n flag to override)", 1396}, + {"Can't lock lock file %s: %s\n", 1397}, + {"can't lock lock file %s: %s", 1398}, + {"timed out", 1399}, {"\ Cannot create link %s\n\ -Perhaps there is a stale lock file?\n", 1401}, - {"cannot open %s (%s) - mtab not updated", 1402}, - {"error writing %s: %s", 1403}, - {"error changing mode of %s: %s\n", 1404}, - {"can't rename %s to %s: %s\n", 1405}, - {"loop: can't open device %s: %s\n", 1406}, - {"loop: can't get info on device %s: %s\n", 1407}, - {"%s: [%04x]:%ld (%s) offset %d, %s encryption\n", 1408}, - {"mount: could not find any device /dev/loop#", 1409}, +Perhaps there is a stale lock file?\n", 1400}, + {"cannot open %s (%s) - mtab not updated", 1401}, + {"error writing %s: %s", 1402}, + {"error changing mode of %s: %s\n", 1403}, + {"can't rename %s to %s: %s\n", 1404}, + {"loop: can't open device %s: %s\n", 1405}, + {"loop: can't get info on device %s: %s\n", 1406}, + {"%s: [%04x]:%ld (%s) offset %d, %s encryption\n", 1407}, + {"mount: could not find any device /dev/loop#", 1408}, {"\ mount: Could not find any loop device.\n\ - Maybe /dev/loop# has a wrong major number?", 1410}, + Maybe /dev/loop# has a wrong major number?", 1409}, {"\ mount: Could not find any loop device, and, according to %s,\n\ this kernel does not know about the loop device.\n\ - (If so, then recompile or `insmod loop.o'.)", 1411}, + (If so, then recompile or `insmod loop.o'.)", 1410}, {"\ mount: Could not find any loop device. Maybe this kernel does not know\n\ about the loop device (then recompile or `insmod loop.o'), or\n\ - maybe /dev/loop# has the wrong major number?", 1412}, - {"mount: could not find any free loop device", 1413}, - {"Unsupported encryption type %s\n", 1414}, - {"Couldn't lock into memory, exiting.\n", 1415}, - {"Init (up to 16 hex digits): ", 1416}, - {"Non-hex digit '%c'.\n", 1417}, - {"Don't know how to get key for encryption system %d\n", 1418}, - {"set_loop(%s,%s,%d): success\n", 1419}, - {"loop: can't delete device %s: %s\n", 1420}, - {"del_loop(%s): success\n", 1421}, - {"This mount was compiled without loop support. Please recompile.\n", 1422}, + maybe /dev/loop# has the wrong major number?", 1411}, + {"mount: could not find any free loop device", 1412}, + {"Unsupported encryption type %s\n", 1413}, + {"Couldn't lock into memory, exiting.\n", 1414}, + {"Init (up to 16 hex digits): ", 1415}, + {"Non-hex digit '%c'.\n", 1416}, + {"Don't know how to get key for encryption system %d\n", 1417}, + {"set_loop(%s,%s,%d): success\n", 1418}, + {"loop: can't delete device %s: %s\n", 1419}, + {"del_loop(%s): success\n", 1420}, + {"This mount was compiled without loop support. Please recompile.\n", 1421}, {"\ usage:\n\ %s loop_device # give info\n\ %s -d loop_device # delete\n\ - %s [ -e encryption ] [ -o offset ] loop_device file # setup\n", 1423}, - {"not enough memory", 1424}, - {"No loop support was available at compile time. Please recompile.\n", 1425}, - {"[mntent]: warning: no final newline at the end of %s\n", 1426}, - {"[mntent]: line %d in %s is bad%s\n", 1427}, - {"; rest of file ignored", 1428}, - {"mount: according to mtab, %s is already mounted on %s", 1429}, - {"mount: according to mtab, %s is mounted on %s", 1430}, - {"mount: can't open %s for writing: %s", 1431}, - {"mount: error writing %s: %s", 1432}, - {"mount: error changing mode of %s: %s", 1433}, - {"%s looks like swapspace - not mounted", 1434}, - {"mount failed", 1435}, - {"mount: only root can mount %s on %s", 1436}, - {"mount: loop device specified twice", 1437}, - {"mount: type specified twice", 1438}, - {"mount: skipping the setup of a loop device\n", 1439}, - {"mount: going to use the loop device %s\n", 1440}, - {"mount: failed setting up loop device\n", 1441}, - {"mount: setup loop device successfully\n", 1442}, - {"mount: can't open %s: %s", 1443}, - {"mount: cannot not open %s for setting speed", 1444}, - {"mount: cannot set speed: %s", 1445}, - {"mount: cannot fork: %s", 1446}, - {"mount: this version was compiled without support for the type `nfs'", 1447}, - {"mount: failed with nfs mount version 4, trying 3..\n", 1448}, - {"\ -mount: I could not determine the filesystem type, and none was specified", 1449}, - {"mount: you must specify the filesystem type", 1450}, - {"mount: mount failed", 1451}, - {"mount: mount point %s is not a directory", 1452}, - {"mount: permission denied", 1453}, - {"mount: must be superuser to use mount", 1454}, - {"mount: %s is busy", 1455}, - {"mount: proc already mounted", 1456}, - {"mount: %s already mounted or %s busy", 1457}, - {"mount: mount point %s does not exist", 1458}, - {"mount: mount point %s is a symbolic link to nowhere", 1459}, - {"mount: special device %s does not exist", 1460}, + %s [ -e encryption ] [ -o offset ] loop_device file # setup\n", 1422}, + {"not enough memory", 1423}, + {"No loop support was available at compile time. Please recompile.\n", 1424}, + {"[mntent]: warning: no final newline at the end of %s\n", 1425}, + {"[mntent]: line %d in %s is bad%s\n", 1426}, + {"; rest of file ignored", 1427}, + {"mount: according to mtab, %s is already mounted on %s", 1428}, + {"mount: according to mtab, %s is mounted on %s", 1429}, + {"mount: can't open %s for writing: %s", 1430}, + {"mount: error writing %s: %s", 1431}, + {"mount: error changing mode of %s: %s", 1432}, + {"%s looks like swapspace - not mounted", 1433}, + {"mount failed", 1434}, + {"mount: only root can mount %s on %s", 1435}, + {"mount: loop device specified twice", 1436}, + {"mount: type specified twice", 1437}, + {"mount: skipping the setup of a loop device\n", 1438}, + {"mount: going to use the loop device %s\n", 1439}, + {"mount: failed setting up loop device\n", 1440}, + {"mount: setup loop device successfully\n", 1441}, + {"mount: can't open %s: %s", 1442}, + {"mount: cannot not open %s for setting speed", 1443}, + {"mount: cannot set speed: %s", 1444}, + {"mount: cannot fork: %s", 1445}, + {"mount: this version was compiled without support for the type `nfs'", 1446}, + {"mount: failed with nfs mount version 4, trying 3..\n", 1447}, + {"\ +mount: I could not determine the filesystem type, and none was specified", 1448}, + {"mount: you must specify the filesystem type", 1449}, + {"mount: mount failed", 1450}, + {"mount: mount point %s is not a directory", 1451}, + {"mount: permission denied", 1452}, + {"mount: must be superuser to use mount", 1453}, + {"mount: %s is busy", 1454}, + {"mount: proc already mounted", 1455}, + {"mount: %s already mounted or %s busy", 1456}, + {"mount: mount point %s does not exist", 1457}, + {"mount: mount point %s is a symbolic link to nowhere", 1458}, + {"mount: special device %s does not exist", 1459}, {"\ mount: special device %s does not exist\n\ - (a path prefix is not a directory)\n", 1461}, - {"mount: %s not mounted already, or bad option", 1462}, + (a path prefix is not a directory)\n", 1460}, + {"mount: %s not mounted already, or bad option", 1461}, {"\ mount: wrong fs type, bad option, bad superblock on %s,\n\ - or too many mounted file systems", 1463}, - {"mount table full", 1464}, - {"mount: %s: can't read superblock", 1465}, - {"mount: %s: unknown device", 1466}, - {"mount: fs type %s not supported by kernel", 1467}, - {"mount: probably you meant %s", 1468}, - {"mount: maybe you meant iso9660 ?", 1469}, - {"mount: %s has wrong device number or fs type %s not supported", 1470}, - {"mount: %s is not a block device, and stat fails?", 1471}, + or too many mounted file systems", 1462}, + {"mount table full", 1463}, + {"mount: %s: can't read superblock", 1464}, + {"mount: %s: unknown device", 1465}, + {"mount: fs type %s not supported by kernel", 1466}, + {"mount: probably you meant %s", 1467}, + {"mount: maybe you meant iso9660 ?", 1468}, + {"mount: %s has wrong device number or fs type %s not supported", 1469}, + {"mount: %s is not a block device, and stat fails?", 1470}, {"\ mount: the kernel does not recognize %s as a block device\n\ - (maybe `insmod driver'?)", 1472}, - {"mount: %s is not a block device (maybe try `-o loop'?)", 1473}, - {"mount: %s is not a block device", 1474}, - {"mount: %s is not a valid block device", 1475}, - {"block device ", 1476}, - {"mount: cannot mount %s%s read-only", 1477}, - {"mount: %s%s is write-protected but explicit `-w' flag given", 1478}, - {"mount: %s%s is write-protected, mounting read-only", 1479}, - {"mount: going to mount %s by %s\n", 1480}, - {"UUID", 1481}, - {"label", 1482}, - {"mount: no such partition found", 1483}, - {"mount: no type was given - I'll assume nfs because of the colon\n", 1484}, - {"mount: backgrounding \"%s\"\n", 1485}, - {"mount: giving up \"%s\"\n", 1486}, - {"mount: %s already mounted on %s\n", 1487}, + (maybe `insmod driver'?)", 1471}, + {"mount: %s is not a block device (maybe try `-o loop'?)", 1472}, + {"mount: %s is not a block device", 1473}, + {"mount: %s is not a valid block device", 1474}, + {"block device ", 1475}, + {"mount: cannot mount %s%s read-only", 1476}, + {"mount: %s%s is write-protected but explicit `-w' flag given", 1477}, + {"mount: %s%s is write-protected, mounting read-only", 1478}, + {"mount: going to mount %s by %s\n", 1479}, + {"UUID", 1480}, + {"label", 1481}, + {"mount: no such partition found", 1482}, + {"mount: no type was given - I'll assume nfs because of the colon\n", 1483}, + {"mount: backgrounding \"%s\"\n", 1484}, + {"mount: giving up \"%s\"\n", 1485}, + {"mount: %s already mounted on %s\n", 1486}, {"\ Usage: mount -V : print version\n\ mount -h : print this help\n\ @@ -1937,36 +1950,37 @@ One can also mount an already visible directory tree elsewhere:\n\ A device can be given by name, say /dev/hda1 or /dev/cdrom,\n\ or by label, using -L label or by uuid, using -U uuid .\n\ Other options: [-nfFrsvw] [-o options].\n\ -For many more details, say man 8 mount .\n", 1488}, - {"mount: only root can do that", 1489}, - {"mount: no %s found - creating it..\n", 1490}, - {"mount: mounting %s\n", 1491}, - {"not mounted anything", 1492}, - {"mount: cannot find %s in %s", 1493}, - {"mount: can't find %s in %s or %s", 1494}, - {"\ -mount: could not open %s, so UUID and LABEL conversion cannot be done.\n", 1495}, - {"mount: bad UUID", 1496}, - {"mount: you didn't specify a filesystem type for %s\n", 1497}, - {" I will try all types mentioned in %s or %s\n", 1498}, - {" and it looks like this is swapspace\n", 1499}, - {" I will try type %s\n", 1500}, - {"Trying %s\n", 1501}, - {"mount: excessively long host:dir argument\n", 1502}, - {"mount: warning: multiple hostnames not supported\n", 1503}, - {"mount: directory to mount not in host:dir format\n", 1504}, - {"mount: can't get address for %s\n", 1505}, - {"mount: got bad hp->h_length\n", 1506}, - {"mount: excessively long option argument\n", 1507}, - {"Warning: Unrecognized proto= option.\n", 1508}, - {"Warning: Option namlen is not supported.\n", 1509}, - {"unknown nfs mount parameter: %s=%d\n", 1510}, - {"Warning: option nolock is not supported.\n", 1511}, - {"unknown nfs mount option: %s%s\n", 1512}, - {"mount: got bad hp->h_length?\n", 1513}, - {"NFS over TCP is not supported.\n", 1514}, - {"nfs socket", 1515}, - {"nfs bindresvport", 1516}, +For many more details, say man 8 mount .\n", 1487}, + {"mount: only root can do that", 1488}, + {"mount: no %s found - creating it..\n", 1489}, + {"mount: mounting %s\n", 1490}, + {"nothing was mounted", 1491}, + {"mount: cannot find %s in %s", 1492}, + {"mount: can't find %s in %s or %s", 1493}, + {"\ +mount: could not open %s, so UUID and LABEL conversion cannot be done.\n", 1494}, + {"mount: bad UUID", 1495}, + {"mount: you didn't specify a filesystem type for %s\n", 1496}, + {" I will try all types mentioned in %s or %s\n", 1497}, + {" and it looks like this is swapspace\n", 1498}, + {" I will try type %s\n", 1499}, + {"Trying %s\n", 1500}, + {"mount: excessively long host:dir argument\n", 1501}, + {"mount: warning: multiple hostnames not supported\n", 1502}, + {"mount: directory to mount not in host:dir format\n", 1503}, + {"mount: can't get address for %s\n", 1504}, + {"mount: got bad hp->h_length\n", 1505}, + {"mount: excessively long option argument\n", 1506}, + {"Warning: Unrecognized proto= option.\n", 1507}, + {"Warning: Option namlen is not supported.\n", 1508}, + {"unknown nfs mount parameter: %s=%d\n", 1509}, + {"Warning: option nolock is not supported.\n", 1510}, + {"unknown nfs mount option: %s%s\n", 1511}, + {"mount: got bad hp->h_length?\n", 1512}, + {"NFS over TCP is not supported.\n", 1513}, + {"nfs socket", 1514}, + {"nfs bindresvport", 1515}, + {"nfs server reported service unavailable", 1516}, {"used portmapper to find NFS port\n", 1517}, {"using port %d for nfs deamon\n", 1518}, {"nfs connect", 1519}, @@ -1979,7 +1993,7 @@ usage: %s [-hV]\n\ %s [-s]\n", 1522}, {"%s on %s\n", 1523}, {"swapon: cannot stat %s: %s\n", 1524}, - {"swapon: warning: %s has insecure permissions %04o, 0600 suggested\n", 1525}, + {"swapon: warning: %s has insecure permissions %04o, %04o suggested\n", 1525}, {"swapon: Skipping file %s - it appears to have holes.\n", 1526}, {"%s: cannot open %s: %s\n", 1527}, {"umount: compiled without support for -f\n", 1528}, @@ -2004,15 +2018,15 @@ usage: %s [-hV]\n\ Usage: umount [-hV]\n\ umount -a [-f] [-r] [-n] [-v] [-t vfstypes]\n\ umount [-f] [-r] [-n] [-v] special | node...\n", 1546}, - {"umount: only root can do that", 1547}, - {"Trying to umount %s\n", 1548}, - {"Could not find %s in mtab\n", 1549}, - {"umount: %s is not mounted (according to mtab)", 1550}, - {"umount: it seems %s is mounted multiple times", 1551}, - {"umount: %s is not in the fstab (and you are not root)", 1552}, - {"umount: %s mount disagrees with the fstab", 1553}, - {"umount: only root can unmount %s from %s", 1554}, - {"umount: only %s can unmount %s from %s", 1555}, + {"Trying to umount %s\n", 1547}, + {"Could not find %s in mtab\n", 1548}, + {"umount: %s is not mounted (according to mtab)", 1549}, + {"umount: it seems %s is mounted multiple times", 1550}, + {"umount: %s is not in the fstab (and you are not root)", 1551}, + {"umount: %s mount disagrees with the fstab", 1552}, + {"umount: only root can unmount %s from %s", 1553}, + {"umount: only %s can unmount %s from %s", 1554}, + {"umount: only root can do that", 1555}, {"You must be root to set the Ctrl-Alt-Del behaviour.\n", 1556}, {"Usage: ctrlaltdel hard|soft\n", 1557}, {"\ @@ -2088,7 +2102,7 @@ Output Format:\n\ {"pages swapped %ld\n", 1609}, {"Swap performance: %ld attempts\t %ld successes\n", 1610}, {"------ Shared Memory Segment Creators/Owners --------\n", 1611}, - {"%-10s%-10s%-10s%-10s%-10s%-10s\n", 1612}, + {"%-10s %-10s %-10s %-10s %-10s %-10s\n", 1612}, {"shmid", 1613}, {"perms", 1614}, {"cuid", 1615}, @@ -2096,22 +2110,22 @@ Output Format:\n\ {"uid", 1617}, {"gid", 1618}, {"------ Shared Memory Attach/Detach/Change Times --------\n", 1619}, - {"%-10s%-10s %-20s%-20s%-20s\n", 1620}, + {"%-10s %-10s %-20s %-20s %-20s\n", 1620}, {"owner", 1621}, {"attached", 1622}, {"detached", 1623}, {"changed", 1624}, {"------ Shared Memory Creator/Last-op --------\n", 1625}, - {"%-10s%-10s%-10s%-10s\n", 1626}, + {"%-10s %-10s %-10s %-10s\n", 1626}, {"cpid", 1627}, {"lpid", 1628}, {"------ Shared Memory Segments --------\n", 1629}, - {"%-10s%-10s%-10s%-10s%-10s%-10s%-12s\n", 1630}, + {"%-10s %-10s %-10s %-10s %-10s %-10s %-12s\n", 1630}, {"key", 1631}, {"bytes", 1632}, {"nattch", 1633}, {"status", 1634}, - {"Not set\n", 1635}, + {"Not set", 1635}, {"dest", 1636}, {"locked", 1637}, {"kernel not configured for semaphores\n", 1638}, @@ -2127,80 +2141,80 @@ Output Format:\n\ {"------ Semaphore Arrays Creators/Owners --------\n", 1648}, {"semid", 1649}, {"------ Shared Memory Operation/Change Times --------\n", 1650}, - {"%-8s%-10s %-26.24s %-26.24s\n", 1651}, + {"%-8s %-10s %-26.24s %-26.24s\n", 1651}, {"last-op", 1652}, {"last-changed", 1653}, {"------ Semaphore Arrays --------\n", 1654}, - {"%-10s%-10s%-10s%-10s%-10s%-12s\n", 1655}, + {"%-10s %-10s %-10s %-10s %-10s %-12s\n", 1655}, {"nsems", 1656}, - {"------ Messages: Limits --------\n", 1657}, - {"max queues system wide = %d\n", 1658}, - {"max size of message (bytes) = %d\n", 1659}, - {"default max size of queue (bytes) = %d\n", 1660}, - {"------ Messages: Status --------\n", 1661}, - {"allocated queues = %d\n", 1662}, - {"used headers = %d\n", 1663}, - {"used space = %d bytes\n", 1664}, - {"------ Message Queues: Creators/Owners --------\n", 1665}, - {"msqid", 1666}, - {"------ Message Queues Send/Recv/Change Times --------\n", 1667}, - {"%-8s%-10s %-20s%-20s%-20s\n", 1668}, - {"send", 1669}, - {"recv", 1670}, - {"change", 1671}, - {"------ Message Queues PIDs --------\n", 1672}, - {"lspid", 1673}, - {"lrpid", 1674}, - {"------ Message Queues --------\n", 1675}, - {"%-10s%-10s%-10s%-10s%-12s%-12s\n", 1676}, - {"used-bytes", 1677}, - {"messages", 1678}, + {"kernel not configured for message queues\n", 1657}, + {"------ Messages: Limits --------\n", 1658}, + {"max queues system wide = %d\n", 1659}, + {"max size of message (bytes) = %d\n", 1660}, + {"default max size of queue (bytes) = %d\n", 1661}, + {"------ Messages: Status --------\n", 1662}, + {"allocated queues = %d\n", 1663}, + {"used headers = %d\n", 1664}, + {"used space = %d bytes\n", 1665}, + {"------ Message Queues: Creators/Owners --------\n", 1666}, + {"msqid", 1667}, + {"------ Message Queues Send/Recv/Change Times --------\n", 1668}, + {"%-8s %-10s %-20s %-20s %-20s\n", 1669}, + {"send", 1670}, + {"recv", 1671}, + {"change", 1672}, + {"------ Message Queues PIDs --------\n", 1673}, + {"lspid", 1674}, + {"lrpid", 1675}, + {"------ Message Queues --------\n", 1676}, + {"%-10s %-10s %-10s %-10s %-12s %-12s\n", 1677}, + {"used-bytes", 1678}, + {"messages", 1679}, {"\ \n\ -Shared memory Segment shmid=%d\n", 1679}, - {"uid=%d\tgid=%d\tcuid=%d\tcgid=%d\n", 1680}, - {"mode=%#o\taccess_perms=%#o\n", 1681}, - {"bytes=%d\tlpid=%d\tcpid=%d\tnattch=%ld\n", 1682}, - {"att_time=%s", 1683}, - {"det_time=%s", 1684}, - {"change_time=%s", 1685}, +Shared memory Segment shmid=%d\n", 1680}, + {"uid=%d\tgid=%d\tcuid=%d\tcgid=%d\n", 1681}, + {"mode=%#o\taccess_perms=%#o\n", 1682}, + {"bytes=%d\tlpid=%d\tcpid=%d\tnattch=%ld\n", 1683}, + {"att_time=%-26.24s\n", 1684}, + {"det_time=%-26.24s\n", 1685}, + {"change_time=%-26.24s\n", 1686}, {"\ \n\ -Message Queue msqid=%d\n", 1686}, - {"uid=%d\tgid=%d\tcuid=%d\tcgid=%d\tmode=%#o\n", 1687}, - {"cbytes=%ld\tqbytes=%ld\tqnum=%ld\tlspid=%d\tlrpid=%d\n", 1688}, - {"send_time=%s", 1689}, - {"rcv_time=%s", 1690}, +Message Queue msqid=%d\n", 1687}, + {"uid=%d\tgid=%d\tcuid=%d\tcgid=%d\tmode=%#o\n", 1688}, + {"cbytes=%ld\tqbytes=%ld\tqnum=%ld\tlspid=%d\tlrpid=%d\n", 1689}, + {"send_time=%-26.24s\n", 1690}, + {"rcv_time=%-26.24s\n", 1691}, {"\ \n\ -Semaphore Array semid=%d\n", 1691}, - {"uid=%d\t gid=%d\t cuid=%d\t cgid=%d\n", 1692}, - {"mode=%#o, access_perms=%#o\n", 1693}, - {"nsems = %ld\n", 1694}, - {"otime = %s", 1695}, - {"ctime = %s", 1696}, - {"%-10s%-10s%-10s%-10s%-10s\n", 1697}, - {"semnum", 1698}, - {"value", 1699}, - {"ncount", 1700}, - {"zcount", 1701}, - {"pid", 1702}, - {"usage: rdev [ -rsv ] [ -o OFFSET ] [ IMAGE [ VALUE [ OFFSET ] ] ]", 1703}, - {"\ - rdev /dev/fd0 (or rdev /linux, etc.) displays the current ROOT device", 1704}, - {" rdev /dev/fd0 /dev/hda2 sets ROOT to /dev/hda2", 1705}, - {" rdev -R /dev/fd0 1 set the ROOTFLAGS (readonly status)", 1706}, - {" rdev -s /dev/fd0 /dev/hda2 set the SWAP device", 1707}, +Semaphore Array semid=%d\n", 1692}, + {"uid=%d\t gid=%d\t cuid=%d\t cgid=%d\n", 1693}, + {"mode=%#o, access_perms=%#o\n", 1694}, + {"nsems = %ld\n", 1695}, + {"otime = %-26.24s\n", 1696}, + {"ctime = %-26.24s\n", 1697}, + {"%-10s %-10s %-10s %-10s %-10s\n", 1698}, + {"semnum", 1699}, + {"value", 1700}, + {"ncount", 1701}, + {"zcount", 1702}, + {"pid", 1703}, + {"usage: rdev [ -rv ] [ -o OFFSET ] [ IMAGE [ VALUE [ OFFSET ] ] ]", 1704}, + {"\ + rdev /dev/fd0 (or rdev /linux, etc.) displays the current ROOT device", 1705}, + {" rdev /dev/fd0 /dev/hda2 sets ROOT to /dev/hda2", 1706}, + {" rdev -R /dev/fd0 1 set the ROOTFLAGS (readonly status)", 1707}, {" rdev -r /dev/fd0 627 set the RAMDISK size", 1708}, {" rdev -v /dev/fd0 1 set the bootup VIDEOMODE", 1709}, {" rdev -o N ... use the byte offset N", 1710}, {" rootflags ... same as rdev -R", 1711}, - {" swapdev ... same as rdev -s", 1712}, - {" ramsize ... same as rdev -r", 1713}, - {" vidmode ... same as rdev -v", 1714}, + {" ramsize ... same as rdev -r", 1712}, + {" vidmode ... same as rdev -v", 1713}, {"\ -Note: video modes are: -3=Ask, -2=Extended, -1=NormalVga, 1=key1, 2=key2,...", 1715}, - {" use -R 1 to mount root readonly, -R 0 for read/write.", 1716}, +Note: video modes are: -3=Ask, -2=Extended, -1=NormalVga, 1=key1, 2=key2,...", 1714}, + {" use -R 1 to mount root readonly, -R 0 for read/write.", 1715}, + {"missing comma", 1716}, {"\ %s: Usage: \"%s [options]\n\ \t -m (default = \"%s\")\n\ @@ -2215,101 +2229,102 @@ Note: video modes are: -3=Ask, -2=Extended, -1=NormalVga, 1=key1, 2=key2,...", 1 {"Sampling_step: %i\n", 1719}, {"%s: %s(%i): wrong map line\n", 1720}, {"%s: can't find \"_stext\" in %s\n", 1721}, - {"total", 1722}, + {"%s: profile address out of range. Wrong map file?\n", 1722}, + {"total", 1723}, {"\ -usage: renice priority [ [ -p ] pids ] [ [ -g ] pgrps ] [ [ -u ] users ]\n", 1723}, - {"renice: %s: unknown user\n", 1724}, - {"renice: %s: bad value\n", 1725}, - {"getpriority", 1726}, - {"setpriority", 1727}, - {"%d: old priority %d, new priority %d\n", 1728}, - {"usage: %s program [arg ...]\n", 1729}, +usage: renice priority [ [ -p ] pids ] [ [ -g ] pgrps ] [ [ -u ] users ]\n", 1724}, + {"renice: %s: unknown user\n", 1725}, + {"renice: %s: bad value\n", 1726}, + {"getpriority", 1727}, + {"setpriority", 1728}, + {"%d: old priority %d, new priority %d\n", 1729}, + {"usage: %s program [arg ...]\n", 1730}, {"\ Usage: %s [ -i | -t