Permalink
Browse files

Imported from util-linux-2.11m tarball.

  • Loading branch information...
1 parent 364cda4 commit e8f2641919de90b488ce3788a7795b88311750b5 @karelzak committed Dec 6, 2006
Showing with 57,459 additions and 34,813 deletions.
  1. +92 −0 HISTORY
  2. +10 −2 INSTALL
  3. +10 −2 MCONFIG
  4. +0 −1 Makefile
  5. +1 −1 VERSION
  6. +14 −0 configure
  7. +24 −4 disk-utils/blockdev.c
  8. +12 −6 disk-utils/fdformat.c
  9. +15 −6 disk-utils/fsck.minix.c
  10. +3 −0 disk-utils/minix.h
  11. +19 −15 disk-utils/mkfs.minix.c
  12. +6 −5 disk-utils/setfdprm.c
  13. +1 −1 fdisk/Makefile
  14. +46 −7 fdisk/cfdisk.c
  15. +106 −58 fdisk/fdisk.c
  16. +1 −1 fdisk/fdisk.h
  17. +8 −4 fdisk/fdiskbsdlabel.c
  18. +2 −3 fdisk/fdisksgilabel.c
  19. +2 −2 fdisk/fdisksunlabel.c
  20. +3 −1 fdisk/i386_sys_types.c
  21. +129 −0 fdisk/partitiontype.c
  22. +32 −20 fdisk/sfdisk.c
  23. +0 −34 games/Makefile
  24. +0 −72 games/banner.6
  25. +0 −1,157 games/banner.c
  26. +75 −58 hwclock/hwclock.c
  27. +1 −0 lib/xstrncpy.c
  28. +1 −1 login-utils/Makefile
  29. +11 −5 login-utils/agetty.c
  30. +54 −11 login-utils/login.c
  31. +6 −4 login-utils/passwd.c
  32. +7 −2 login-utils/shutdown.c
  33. +5 −3 login-utils/simpleinit.c
  34. +87 −82 login-utils/vipw.c
  35. +7 −0 login-utils/wall.c
  36. +5 −2 misc-utils/Makefile
  37. +83 −17 misc-utils/cal.c
  38. +6 −3 misc-utils/logger.1
  39. +12 −3 misc-utils/namei.c
  40. +179 −0 misc-utils/replay.1
  41. +79 −0 misc-utils/replay.pl
  42. +7 −0 misc-utils/script.1
  43. +15 −2 misc-utils/script.c
  44. +2 −2 misc-utils/setterm.c
  45. +4 −3 mount/fstab.5
  46. +52 −0 mount/linux_fs.h
  47. +161 −15 mount/mount.8
  48. +2 −2 mount/mount_by_label.c
  49. +72 −11 mount/mount_guess_fstype.c
  50. +12 −6 mount/mount_guess_rootdev.c
  51. +1 −1 mount/nfs.5
  52. +20 −7 mount/nfsmount.c
  53. +0 −1 mount/nfsmount.x
  54. +0 −1 mount/rpcsvc/nfsmount.h
  55. +0 −1 mount/rpcsvc/nfsmount.x
  56. +1 −1 mount/sundries.c
  57. +2 −0 mount/swapon.c
  58. +13 −5 mount/umount.8
  59. +39 −14 mount/umount.c
  60. +2 −2 po/Makefile
  61. +0 −1 po/POTFILES.in
  62. +1,837 −1,820 po/cat-id-tbl.c
  63. +1,457 −1,296 po/cs.po
  64. +2,270 −1,775 po/da.po
  65. +4,675 −4,542 po/de.po
  66. +5,424 −4,968 po/es.po
  67. +4,690 −4,213 po/fr.po
  68. +5,426 −4,970 po/it.po
  69. +4,176 −3,687 po/ja.po
  70. +4,254 −3,990 po/nl.po
  71. +2,540 −1,843 po/pt_BR.po
  72. +9,696 −0 po/sv.po
  73. +9,327 −0 po/tr.po
  74. +16 −12 sys-utils/cytune.c
  75. +2 −2 sys-utils/ipcrm.8
  76. +2 −2 sys-utils/ipcs.c
  77. +1 −0 sys-utils/rdev.c
  78. +26 −6 sys-utils/readprofile.c
  79. +17 −7 sys-utils/renice.c
  80. +4 −1 testincl
  81. +8 −2 text-utils/Makefile
  82. +17 −0 text-utils/line.1
  83. +22 −0 text-utils/line.sh
  84. +5 −1 text-utils/more.1
  85. +8 −8 text-utils/more.c
View
92 HISTORY
@@ -1,3 +1,95 @@
+util-linux 2.11m
+
+* Danish messages (Claus Hindsgaul)
+* German messages (Karl Eichwalder)
+* Swedish messages (Christian Rose)
+* Turkish messages (Nilg�n Belma Bug�ner)
+* fdisk: added netbsd type (Steven J. Hill)
+* more: fix for unsigned char (Rusty Russell)
+* mount: added sysv magic (Tim Launchbury)
+* setterm: fixed "setterm -foreground default"
+
+util-linux 2.11l
+
+* Danish messages (Claus Hindsgaul)
+* banner: removed - it is in bsdgames
+* fdisk: show partitions with empty type but some other nonzero field
+* login: copy the static struct that getpwnam() returns before calling
+ PAM routines that might themselves use getpwnam(). Abort on problems.
+ (Olaf Kirch)
+* mount: added jfs magic (Christoph Hellwig)
+* renice: report the correct new priority after a setpriority()
+* umount: add lazy unmount (Christoph Hellwig)
+
+util-linux 2.11k
+
+ Various potential buffer overflows were pointed out by awayzzz@digibel.org.
+ Fixes in agetty, hwclock, namei, readprofile, simpleinit, vipw.
+ (Also added a few [f]close() calls - entirely superfluously.)
+
+* agetty: avoid possible buffer overflow
+* cfdisk: recognize xfs (Nathan Scott)
+* cytune: added close()
+* fdformat: added close()
+* fdisk: added fclose()
+* hwclock: avoid possible buffer overflow
+* mkfs.minix: added fclose()
+* mount: remove the assumption that 635 is the default mount port
+* namei: avoid possible buffer overflow
+* rdev: added closedir()
+* readprofile: avoid possible buffer overflow
+* sfdisk: added fclose()
+* simpleinit: avoid possible buffer overflow
+* swapon: added fclose()
+* umount: use tcp when mount was done using tcp (James D Strandboge)
+* vipw: avoid possible buffer overflow
+
+util-linux 2.11j
+
+* No new French messages yet
+* fdisk: fix for AIX label (Olaf Hering)
+* fdisk: fix for creating DOS label when BSD label is present
+* mount.8: added remark about blocksize to ext2 sb= mount option description.
+* partitiontype: new, not installed
+
+util-linux 2.11i
+
+* testincl: do not run conftest (Brian Murphy)
+* blockdev: corrected ioctl numbers now that BLKBSZGET is in 2.4.10pre3
+* cal: fixed for Hungarian locale
+* cal: fixed for multibyte locales (Pablo Saratxaga)
+* fdisk: avoid superfluous warning about DOS partitions
+* line: new, to support SCO shell scripts (Christoph Hellwig)
+* mount: added vxfs magic
+* passwd: tiny fix for ARM (Ken Cox)
+* replay: replay typescript with timings (Joey Hess)
+* script: add -t flag for timing (Joey Hess)
+
+util-linux 2.11h
+
+* Turkish messages (Nilg�n Belma Bug�ner)
+* Danish messages (Claus Hindsgaul)
+* banner: minor fix (awayzzz@digibel.org)
+* mkfs.minix: minix v2 fix
+* more.1: improved (Edward Betts)
+* mount.8: corrected description of the nwfs uni_xlate mount option
+* vipw: make temp files of mode 0600 (Bill Nottingham)
+* wall: avoid writing to /dev/:0
+
+util-linux 2.11g
+
+* MCONFIG & configure: fix for gcc 3.0
+ Note that nfsmount_xdr.c may give warnings with gcc 3.0, essentially
+ because of defines in <rpc/xdr.h> that use things like ntohl(*buf++)
+ where ntohl(x) is a macro with several occurrences of x.
+* blockdev: support for the get/set blocksize ioctls
+ [not yet in the 2.4.5 kernel]
+* fdisk: added Linux/PA-RISC type (Matt Taggart)
+* mount: minor fix (Andrey J. Melnikoff)
+* mount: added some ext3 stuff (Andrew Morton)
+* mount: added heuristics for reiserfs (Andrew Morton)
+* mount.8: added ext3 and reiserfs docs (Andrew Morton)
+
util-linux 2.11f
* Czech messages (Ji�� Pavlovsk�)
View
12 INSTALL
@@ -21,8 +21,8 @@ WARNING: The simpleinit and some other programs in this package are
To install from source:
1) Get source distribution (see the .lsm file for locations)
-2) Untar util-linux-2.10X.tar.gz somewhere
-3) cd util-linux-2.10X
+2) Untar util-linux-2.11X.tar.gz somewhere
+3) cd util-linux-2.11X
4) Edit MCONFIG
5) ./configure
6) Look at defines.h and make_include, and edit if necessary
@@ -34,6 +34,14 @@ To install from source:
compatible init!), or you will be hosed. If you are using the SysV
init and/or some other getty, they you can keep using those.
+People ask: I want to link statically and install in /foo. How?
+Answer: Try the following:
+ LDFLAGS="-static"
+ DESTDIR=/foo
+ export LDFLAGS DESTDIR
+ ./configure
+ make
+ make install
If you have compilation problems: tell util-linux@math.uio.no about it.
View
12 MCONFIG
@@ -92,12 +92,20 @@ HAVE_FDUTILS=no
# ADD_RAW=yes
# Different optimizations for different cpus.
+# gcc 3.0 likes options -mcpu=i486 instead of -m486
ifeq "$(ARCH)" "intel"
+ ifeq "$(HAVE_OLD_GCC)" "yes"
+ CPUHEAD=-m
+ else
+ CPUHEAD=-mcpu=i
+ endif
ifeq "$(CPU)" "i386"
- OPT= -pipe -O2 -m386 -fomit-frame-pointer
+ CPUTAIL=386
else
- OPT= -pipe -O2 -m486 -fomit-frame-pointer
+ CPUTAIL=486
endif
+ CPUOPT= $(CPUHEAD)$(CPUTAIL)
+ OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer
else
ifeq "$(ARCH)" "arm"
OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer
View
@@ -12,7 +12,6 @@ SUBDIRS=po \
lib \
getopt-1.1.2 \
disk-utils \
- games \
login-utils \
misc-utils \
mount \
View
@@ -1 +1 @@
-2.11f
+2.11m
View
@@ -3,6 +3,8 @@
#
# We need to find out the following things:
#
+# Version of gcc
+#
# Existence of header files:
# H1. For fdisksunlabel.c: is there a <scsi/scsi.h>?
# H2. For fdisk.c: is there a <linux/blkpg.h>?
@@ -61,6 +63,18 @@ export COMPILE
rm -f conftest.c conftest
+#
+# Old gcc wants options like -m486, but gcc 3.0 says
+# `-m486' is deprecated. Use `-march=i486' or `-mcpu=i486' instead.
+#
+echo "
+main(){ exit(0); }
+" > conftest.c
+gccout=`$CC $CFLAGS -m386 conftest.c -o conftest 2>&1 | grep "march="`
+if test -z "$gccout"; then
+ echo "HAVE_OLD_GCC=yes" >> make_include
+fi
+rm -f conftest conftest.c
#
# Find out about the existence of header files
View
@@ -25,6 +25,8 @@
#define BLKRASET _IO(0x12,98)
#define BLKRAGET _IO(0x12,99)
#define BLKSSZGET _IO(0x12,104)
+#define BLKBSZGET _IOR(0x12,112,sizeof(int))
+#define BLKBSZSET _IOW(0x12,113,sizeof(int))
#endif
const char *progname;
@@ -36,9 +38,10 @@ struct bdc {
int argtype;
#define ARGNONE 0
#define ARGINTA 1
-#define ARGINTP 2
-#define ARGINTG 3
-#define ARGLINTG 4
+#define ARGINTAP 2
+#define ARGINTP 3
+#define ARGINTG 4
+#define ARGLINTG 5
long argval;
char *argname;
char *help;
@@ -53,6 +56,12 @@ struct bdc {
#ifdef BLKSSZGET
{ "--getss", "BLKSSZGET", BLKSSZGET, ARGINTG, -1, NULL, N_("get sectorsize") },
#endif
+#ifdef BLKBSZGET
+ { "--getbsz", "BLKBSZGET", BLKBSZGET, ARGINTG, -1, NULL, N_("get blocksize") },
+#endif
+#ifdef BLKBSZSET
+ { "--setbsz", "BLKBSZSET", BLKBSZSET, ARGINTAP, 0, "BLOCKSIZE", N_("set blocksize") },
+#endif
#ifdef BLKGETSIZE
{ "--getsize", "BLKGETSIZE", BLKGETSIZE, ARGLINTG, -1, NULL, N_("get size") },
#endif
@@ -132,7 +141,8 @@ main(int argc, char **argv) {
for (d = 1; d < argc; d++) {
j = find_cmd(argv[d]);
if (j >= 0) {
- if (bdcms[j].argtype == ARGINTA)
+ if (bdcms[j].argtype == ARGINTA ||
+ bdcms[j].argtype == ARGINTAP)
d++;
continue;
}
@@ -154,6 +164,7 @@ main(int argc, char **argv) {
exit(1);
}
do_commands(fd, argv, d);
+ close(fd);
}
return 0;
}
@@ -195,6 +206,15 @@ do_commands(int fd, char **argv, int d) {
iarg = atoi(argv[++i]);
res = ioctl(fd, bdcms[j].ioc, iarg);
break;
+ case ARGINTAP:
+ if (i == d-1) {
+ fprintf(stderr, _("%s requires an argument\n"),
+ bdcms[j].name);
+ usage();
+ }
+ iarg = atoi(argv[++i]);
+ res = ioctl(fd, bdcms[j].ioc, &iarg);
+ break;
case ARGINTP:
case ARGINTG:
iarg = bdcms[j].argval;
View
@@ -21,14 +21,13 @@
/* cannot include <linux/fs.h> */
#define MAJOR(a) ((a)>>8)
-static int ctrl;
struct floppy_struct param;
#define FLOPPY_MAJOR 2
#define SECTOR_SIZE 512
#define PERROR(msg) { perror(msg); exit(1); }
-static void format_disk(char *name)
+static void format_disk(int ctrl, char *name)
{
struct format_descr descr;
int track;
@@ -103,6 +102,7 @@ static void usage(char *name)
int main(int argc,char **argv)
{
+ int ctrl;
int verify;
struct stat st;
char *progname, *p;
@@ -135,13 +135,19 @@ int main(int argc,char **argv)
exit(1);
}
if (access(argv[1],W_OK) < 0) PERROR(argv[1]);
- if ((ctrl = open(argv[1],O_WRONLY)) < 0) PERROR(argv[1]);
+
+ ctrl = open(argv[1],O_WRONLY);
+ if (ctrl < 0)
+ PERROR(argv[1]);
if (ioctl(ctrl,FDGETPRM,(long) &param) < 0)
- PERROR(_("Could not determine current format type"));
+ PERROR(_("Could not determine current format type"));
printf(_("%s-sided, %d tracks, %d sec/track. Total capacity %d kB.\n"),
(param.head == 2) ? _("Double") : _("Single"),
param.track, param.sect,param.size >> 1);
- format_disk(argv[1]);
- if (verify) verify_disk(argv[1]);
+ format_disk(ctrl, argv[1]);
+ close(ctrl);
+
+ if (verify)
+ verify_disk(argv[1]);
return 0;
}
View
@@ -1015,7 +1015,7 @@ check_file2 (struct minix2_inode *dir, unsigned int offset) {
if (ino > INODES) {
printf(_("The directory '"));
print_current_name ();
- printf (_("' contains a bad inode number for file '%.*s'.",
+ printf (_("' contains a bad inode number for file '%.*s'."),
namelen, name);
if (ask (_(" Remove"), 1)) {
*(unsigned short *) (name - 2) = 0;
@@ -1155,8 +1155,12 @@ check_counts(void) {
unmark_zone(i);
continue;
}
- printf(_("Zone %d: %sin use, counted=%d\n"),
- i,zone_in_use(i)?"":_("not "),zone_count[i]);
+ if (zone_in_use(i))
+ printf(_("Zone %d: in use, counted=%d\n"),
+ i, zone_count[i]);
+ else
+ printf(_("Zone %d: not in use, counted=%d\n"),
+ i, zone_count[i]);
}
}
@@ -1201,13 +1205,18 @@ check_counts2 (void) {
if (!zone_count[i]) {
if (bad_zone (i))
continue;
- printf (_("Zone %d: marked in use, no file uses it."), i);
+ printf (_("Zone %d: marked in use, no file uses it."),
+ i);
if (ask (_("Unmark"), 1))
unmark_zone (i);
continue;
}
- printf (_("Zone %d: %sin use, counted=%d\n"),
- i, zone_in_use (i) ? "" : _("not "), zone_count[i]);
+ if (zone_in_use (i))
+ printf (_("Zone %d: in use, counted=%d\n"),
+ i, zone_count[i]);
+ else
+ printf (_("Zone %d: not in use, counted=%d\n"),
+ i, zone_count[i]);
}
}
#endif
View
@@ -50,11 +50,14 @@ struct minix_super_block {
#define NAME_MAX 255 /* # chars in a file name */
#define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode)))
+#define MINIX2_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix2_inode)))
#define MINIX_VALID_FS 0x0001 /* Clean fs. */
#define MINIX_ERROR_FS 0x0002 /* fs has errors. */
#define MINIX_SUPER_MAGIC 0x137F /* original minix fs */
#define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */
+#define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */
+#define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */
#endif /* KERNEL_INCLUDES_ARE_CLEAN */
Oops, something went wrong.

0 comments on commit e8f2641

Please sign in to comment.