aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-03-28 02:13:01 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-03-28 02:13:01 +0000
commit9d04b6b6304f65f4a5118664cc503fdc0f68ea28 (patch)
treef9011340df362c502147754e720d589f442ec68a /include
parent4d3a812b71d1933860b268dbea15ffcea396e394 (diff)
downloadbusybox-9d04b6b6304f65f4a5118664cc503fdc0f68ea28.tar.gz
mkdosfs (aka mkfs.vfat): new applet by Vladimir
text data bss dec hex filename 821202 476 7616 829294 ca76e busybox_old 823577 476 7616 831669 cb0b5 busybox_unstripped
Diffstat (limited to 'include')
-rw-r--r--include/applets.h2
-rw-r--r--include/libbb.h4
-rw-r--r--include/usage.h16
3 files changed, 22 insertions, 0 deletions
diff --git a/include/applets.h b/include/applets.h
index becb14066..1d932589b 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -250,11 +250,13 @@ USE_MDEV(APPLET(mdev, _BB_DIR_SBIN, _BB_SUID_NEVER))
USE_MESG(APPLET(mesg, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
USE_MICROCOM(APPLET(microcom, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
USE_MKDIR(APPLET_NOFORK(mkdir, mkdir, _BB_DIR_BIN, _BB_SUID_NEVER, mkdir))
+USE_MKFS_VFAT(APPLET_ODDNAME(mkdosfs, mkfs_vfat, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_vfat))
//USE_MKE2FS(APPLET(mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER))
USE_MKFIFO(APPLET(mkfifo, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
//USE_MKE2FS(APPLET_ODDNAME(mkfs.ext2, mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_ext2))
//USE_MKE2FS(APPLET_ODDNAME(mkfs.ext3, mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_ext3))
USE_MKFS_MINIX(APPLET_ODDNAME(mkfs.minix, mkfs_minix, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_minix))
+USE_MKFS_VFAT(APPLET_ODDNAME(mkfs.vfat, mkfs_vfat, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_vfat))
USE_MKNOD(APPLET(mknod, _BB_DIR_BIN, _BB_SUID_NEVER))
USE_CRYPTPW(APPLET_ODDNAME(mkpasswd, cryptpw, _BB_DIR_USR_BIN, _BB_SUID_NEVER, mkpasswd))
USE_MKSWAP(APPLET(mkswap, _BB_DIR_SBIN, _BB_SUID_NEVER))
diff --git a/include/libbb.h b/include/libbb.h
index 015374b4a..c2e034447 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -150,6 +150,7 @@ int sysinfo(struct sysinfo* info);
/* CONFIG_LFS is on */
# if ULONG_MAX > 0xffffffff
/* "long" is long enough on this system */
+typedef unsigned long uoff_t;
# define XATOOFF(a) xatoul_range(a, 0, LONG_MAX)
/* usage: sz = BB_STRTOOFF(s, NULL, 10); if (errno || sz < 0) die(); */
# define BB_STRTOOFF bb_strtoul
@@ -158,6 +159,7 @@ int sysinfo(struct sysinfo* info);
# define OFF_FMT "l"
# else
/* "long" is too short, need "long long" */
+typedef unsigned long long uoff_t;
# define XATOOFF(a) xatoull_range(a, 0, LLONG_MAX)
# define BB_STRTOOFF bb_strtoull
# define STRTOOFF strtoull
@@ -168,11 +170,13 @@ int sysinfo(struct sysinfo* info);
# if UINT_MAX == 0xffffffff
/* While sizeof(off_t) == sizeof(int), off_t is typedef'ed to long anyway.
* gcc will throw warnings on printf("%d", off_t). Crap... */
+typedef unsigned long uoff_t;
# define XATOOFF(a) xatoi_u(a)
# define BB_STRTOOFF bb_strtou
# define STRTOOFF strtol
# define OFF_FMT "l"
# else
+typedef unsigned long uoff_t;
# define XATOOFF(a) xatoul_range(a, 0, LONG_MAX)
# define BB_STRTOOFF bb_strtoul
# define STRTOOFF strtol
diff --git a/include/usage.h b/include/usage.h
index 2b5d34ea6..16d5eec9f 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -2670,6 +2670,22 @@
"\n -l FILENAME Read bad blocks list from FILENAME" \
"\n -v Make version 2 filesystem" \
+#define mkfs_vfat_trivial_usage \
+ "[-v] [-n LABEL] FILE_OR_DEVICE [SIZE_IN_KB]"
+/* Accepted but ignored:
+ "[-c] [-C] [-I] [-l bad-block-file] [-b backup-boot-sector] "
+ "[-m boot-msg-file] [-i volume-id] "
+ "[-s sectors-per-cluster] [-S logical-sector-size] [-f number-of-FATs] "
+ "[-h hidden-sectors] [-F fat-size] [-r root-dir-entries] [-R reserved-sectors] "
+*/
+#define mkfs_vfat_full_usage "\n\n" \
+ "Make a FAT32 filesystem\n" \
+ "\nOptions:" \
+/* "\n -c Check device for bad blocks" */ \
+ "\n -v Verbose" \
+/* "\n -I Allow to use entire disk device (e.g. /dev/hda)" */ \
+ "\n -n LBL Volume label" \
+
#define mknod_trivial_usage \
"[OPTIONS] NAME TYPE MAJOR MINOR"
#define mknod_full_usage "\n\n" \