diff -uNr busybox-1.17.2/include/applets.src.h busybox-1.17.2-new/include/applets.src.h
--- busybox-1.17.2/include/applets.src.h	2010-08-23 04:44:35.000000000 +0400
+++ busybox-1.17.2-new/include/applets.src.h	2010-09-05 01:13:45.000000000 +0400
@@ -81,6 +81,7 @@
 //IF_BBSH(APPLET(bbsh, _BB_DIR_BIN, _BB_SUID_DROP))
 IF_BEEP(APPLET(beep, _BB_DIR_USR_BIN, _BB_SUID_DROP))
 IF_BLKID(APPLET(blkid, _BB_DIR_SBIN, _BB_SUID_DROP))
+IF_BLOCKDEV(APPLET(blockdev, _BB_DIR_SBIN, _BB_SUID_DROP))
 IF_BOOTCHARTD(APPLET(bootchartd, _BB_DIR_SBIN, _BB_SUID_DROP))
 IF_BRCTL(APPLET(brctl, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
 IF_BZIP2(APPLET(bzip2, _BB_DIR_USR_BIN, _BB_SUID_DROP))
diff -uNr busybox-1.17.2/include/usage.src.h busybox-1.17.2-new/include/usage.src.h
--- busybox-1.17.2/include/usage.src.h	2010-08-23 04:44:35.000000000 +0400
+++ busybox-1.17.2-new/include/usage.src.h	2010-09-05 15:17:11.000000000 +0400
@@ -163,6 +163,21 @@
 #define blkid_full_usage "\n\n" \
        "Print UUIDs of all filesystems"
 
+#define blockdev_trivial_usage \
+       "OPTION [OPTARG] DEVICE\n"
+#define blockdev_full_usage "\n\n" \
+       "OPTIONS:\n" \
+       "--setro		Set ro\n" \
+       "--setrw		Set rw\n" \
+       "--getro		Get ro (1 if ro, 0 if rw)\n" \
+       "--getss		Get sector size\n" \
+       "--getbsz	Get block size\n" \
+       "--setbsz N	Set block size to N\n" \
+       "--getsize	Get device size in 512-sectors\n" \
+       "--getsize64	Get device size in bytes\n" \
+       "--flushbufs	Flush buffers\n" \
+       "--rereadpt	Reread partition table\n"
+
 #define brctl_trivial_usage \
        "COMMAND [BRIDGE [INTERFACE]]"
 #define brctl_full_usage "\n\n" \
diff -uNr busybox-1.17.2/util-linux/blockdev.c busybox-1.17.2-new/util-linux/blockdev.c
--- busybox-1.17.2/util-linux/blockdev.c	1970-01-01 03:00:00.000000000 +0300
+++ busybox-1.17.2-new/util-linux/blockdev.c	2010-09-05 14:43:20.000000000 +0400
@@ -0,0 +1,188 @@
+#include "libbb.h"
+#include <linux/fs.h>
+
+enum {
+	OK = 0,
+	ERR_NOCMD,
+	ERR_NOARG,
+	ERR_EXARG,
+	ERR_IOCTL,
+	ERR_NODEV,
+};
+
+/* ioctl argument types */
+enum {
+	ARG_NONE = 0,
+	ARG_INT,
+	ARG_ULONG,
+	ARG_ULLONG,
+};
+
+enum {
+	FL_NORESULT = (1 << 2),
+	FL_USRARG = (1 << 3), /* argument is provided by user */
+};
+
+struct bdc {
+	long		ioc;		/* ioctl code */
+	long		argval;		/* default argument */
+
+	const char	*name;		/* --setfoo */
+
+	int		argtype;
+	int		flags;
+};
+
+#define IOCTL_ENTRY( io )	.ioc = io
+
+struct bdc bdcms[] =
+{
+	{
+		IOCTL_ENTRY(BLKROSET),
+		.name = "--setro",
+		.argtype = ARG_INT,
+		.argval = 1,
+		.flags = FL_NORESULT,
+	},{
+		IOCTL_ENTRY(BLKROSET),
+		.name = "--setrw",
+		.argtype = ARG_INT,
+		.argval = 0,
+		.flags = FL_NORESULT,
+	},{
+		IOCTL_ENTRY(BLKROGET),
+		.name = "--getro",
+		.argtype = ARG_INT,
+		.argval = -1,
+	},{
+		IOCTL_ENTRY(BLKSSZGET),
+		.name = "--getss",
+		.argtype = ARG_INT,
+		.argval = -1,
+	},{
+		IOCTL_ENTRY(BLKBSZGET),
+		.name = "--getbsz",
+		.argtype = ARG_INT,
+		.argval = -1,
+	},{
+		IOCTL_ENTRY(BLKBSZSET),
+		.name = "--setbsz",
+		.argtype = ARG_INT,
+		.flags = FL_NORESULT | FL_USRARG,
+	},{
+		IOCTL_ENTRY(BLKGETSIZE),
+		.name = "--getsize",
+		.argtype = ARG_ULONG,
+		.argval = -1,
+	},{
+		IOCTL_ENTRY(BLKGETSIZE64),
+		.name = "--getsize64",
+		.argtype = ARG_ULLONG,
+		.argval = -1,
+	},{
+		IOCTL_ENTRY(BLKFLSBUF),
+		.name = "--flushbufs",
+	},{
+		IOCTL_ENTRY(BLKRRPART),
+		.name = "--rereadpt",
+	}
+};
+
+static int do_cmd(int fd, int argc, char **argv);
+static int find_cmd(char *s);
+int blockdev_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int blockdev_main(int argc, char **argv)
+{
+	int fd;
+	int res;
+	int i;
+	
+	if (argc != 3 && argc != 4) bb_show_usage();
+	if ((fd = open(argv[argc - 1], O_RDONLY, 0)) < 0) 
+		return bb_perror_msg("%s", argv[argc - 1]), ERR_NODEV;
+	res = do_cmd(fd, argc, argv);
+	close(fd);
+	switch (res) {
+		case ERR_NOCMD:
+		bb_perror_msg("%s: no such option", argv[1]);
+		bb_show_usage();
+		break;
+		case ERR_NOARG:
+		bb_perror_msg("option argument required");
+		bb_show_usage();
+		break;
+		case ERR_EXARG:
+		bb_perror_msg("extra argument provided");
+		bb_show_usage();
+		break;
+		case ERR_IOCTL:
+		bb_perror_msg("ioctl failure");
+		break;
+	}
+	return res;
+}
+
+static int find_cmd(char *s)
+{
+	int j;
+
+	for (j = 0; j < ARRAY_SIZE(bdcms); j++)
+		if (!strcmp(s, bdcms[j].name))
+			return j;
+	return -1;
+}
+
+static int do_cmd(int fd, int argc, char **argv)
+{
+	int j; //cmd index
+	int res = OK;
+	
+	int iarg;
+	unsigned long lu;
+	unsigned long long llu;
+	
+	if (-1 == (j = find_cmd(argv[1]))) return ERR_NOCMD;
+	if (bdcms[j].flags & FL_USRARG)
+		if (argc == 3) return ERR_NOARG;
+	else
+		if (argc == 4) return ERR_EXARG;
+	
+	switch(bdcms[j].argtype) {
+	default:
+	case ARG_NONE:
+		res = ioctl(fd, bdcms[j].ioc, 0);
+		break;
+	case ARG_INT:
+		if (bdcms[j].flags & FL_USRARG) {
+			iarg = atoi(argv[2]);
+		} else
+			iarg = bdcms[j].argval;
+
+		res = ioctl(fd, bdcms[j].ioc, &iarg);
+		break;
+	case ARG_ULONG:
+		lu = bdcms[j].argval;
+		res = ioctl(fd, bdcms[j].ioc, &lu);
+		break;
+	case ARG_ULLONG:
+		llu = bdcms[j].argval;
+		res = ioctl(fd, bdcms[j].ioc, &llu);
+		break;
+	}
+	if (res == -1) return ERR_IOCTL;
+	if (bdcms[j].flags & FL_NORESULT) return OK;
+
+	switch(bdcms[j].argtype) {
+	case ARG_INT:
+		printf("%d\n", iarg);
+		break;
+	case ARG_ULONG:
+		printf("%lu\n", lu);
+		break;
+	case ARG_ULLONG:
+		printf("%llu\n", llu);
+		break;
+	}
+	
+	return OK;
+}
diff -uNr busybox-1.17.2/util-linux/Config.src busybox-1.17.2-new/util-linux/Config.src
--- busybox-1.17.2/util-linux/Config.src	2010-08-23 04:44:36.000000000 +0400
+++ busybox-1.17.2-new/util-linux/Config.src	2010-09-05 01:17:16.000000000 +0400
@@ -38,6 +38,12 @@
 	  WARNING:
 	  With all submodules selected, it will add ~8k to busybox.
 
+config BLOCKDEV
+	bool "blockdev"
+	default y
+	help
+	  Performs some ioctls with block devices.
+
 config DMESG
 	bool "dmesg"
 	default y
diff -uNr busybox-1.17.2/util-linux/Kbuild.src busybox-1.17.2-new/util-linux/Kbuild.src
--- busybox-1.17.2/util-linux/Kbuild.src	2010-08-23 04:44:36.000000000 +0400
+++ busybox-1.17.2-new/util-linux/Kbuild.src	2010-09-05 01:17:52.000000000 +0400
@@ -9,6 +9,7 @@
 INSERT
 lib-$(CONFIG_ACPID)             += acpid.o
 lib-$(CONFIG_BLKID)             += blkid.o
+lib-$(CONFIG_BLOCKDEV)          += blockdev.o
 lib-$(CONFIG_DMESG)             += dmesg.o
 lib-$(CONFIG_FBSET)             += fbset.o
 lib-$(CONFIG_FDFLUSH)           += freeramdisk.o
