Permalink
Browse files

Rodney Radford submitted ipcs and ipcrm (system V IPC stuff). They co…

…uld use

some more work to shrink them down.
  • Loading branch information...
1 parent df1eda8 commit 6eb1e416743c597f8ecd3b595ddb00d3aa42c1f4 @landley landley committed Jun 20, 2005
Showing with 1,049 additions and 28 deletions.
  1. +3 −0 AUTHORS
  2. +9 −9 docs/busybox_header.pod
  3. +6 −0 include/applets.h
  4. +40 −2 include/usage.h
  5. +2 −0 sysdeps/linux/defconfig
  6. +28 −17 util-linux/Config.in
  7. +2 −0 util-linux/Makefile.in
  8. +273 −0 util-linux/ipcrm.c
  9. +686 −0 util-linux/ipcs.c
View
@@ -113,6 +113,9 @@ Bruce Perens <bruce@pixar.com>
Original author of BusyBox in 1995, 1996. Some of his code can
still be found hiding here and there...
+Rodney Radford <rradford@mindspring.com>
+ ipcs, ipcrm
+
Tim Riker <Tim@Rikers.org>
bug fixes, member of fan club
View
@@ -89,15 +89,15 @@ Currently defined functions include:
fgrep, find, fold, free, freeramdisk, fsck.minix, ftpget, ftpput, getopt,
getty, grep, gunzip, gzip, halt, hdparm, head, hexdump, hostid, hostname,
httpd, hush, hwclock, id, ifconfig, ifdown, ifup, inetd, init, insmod,
- install, ip, ipaddr, ipcalc, iplink, iproute, iptunnel, kill, killall,
- klogd, lash, last, length, linuxrc, ln, loadfont, loadkmap, logger, login,
- logname, logread, losetup, ls, lsmod, makedevs, md5sum, mesg, mkdir,
- mkfifo, mkfs.minix, mknod, mkswap, mktemp, modprobe, more, mount, msh, mt,
- mv, nameif, nc, netstat, nslookup, od, openvt, passwd, patch, pidof, ping,
- ping6, pipe_progress, pivot_root, poweroff, printf, ps, pwd, rdate,
- readlink, realpath, reboot, renice, reset, rm, rmdir, rmmod, route, rpm,
- rpm2cpio, run-parts, rx, sed, seq, setkeycodes, sha1sum, sleep, sort,
- start-stop-daemon, strings, stty, su, sulogin, swapoff, swapon, sync,
+ install, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iptunnel, kill,
+ killall, klogd, lash, last, length, linuxrc, ln, loadfont, loadkmap,
+ logger, login, logname, logread, losetup, ls, lsmod, makedevs, md5sum,
+ mesg, mkdir, mkfifo, mkfs.minix, mknod, mkswap, mktemp, modprobe, more,
+ mount, msh, mt, mv, nameif, nc, netstat, nslookup, od, openvt, passwd,
+ patch, pidof, ping, ping6, pipe_progress, pivot_root, poweroff, printf, ps,
+ pwd, rdate, readlink, realpath, reboot, renice, reset, rm, rmdir, rmmod,
+ route, rpm, rpm2cpio, run-parts, rx, sed, seq, setkeycodes, sha1sum, sleep,
+ sort, start-stop-daemon, strings, stty, su, sulogin, swapoff, swapon, sync,
sysctl, syslogd, tail, tar, tee, telnet, telnetd, test, tftp, time, top,
touch, tr, traceroute, true, tty, udhcpc, udhcpd, umount, uname,
uncompress, uniq, unix2dos, unzip, uptime, usleep, uudecode, uuencode,
View
@@ -320,6 +320,12 @@
#ifdef CONFIG_IPCALC
APPLET(ipcalc, ipcalc_main, _BB_DIR_BIN, _BB_SUID_NEVER)
#endif
+#ifdef CONFIG_IPCRM
+ APPLET(ipcrm, ipcrm_main, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)
+#endif
+#ifdef CONFIG_IPCS
+ APPLET(ipcs, ipcs_main, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)
+#endif
#ifdef CONFIG_IPLINK
APPLET(iplink, iplink_main, _BB_DIR_BIN, _BB_SUID_NEVER)
#endif
View
@@ -1395,6 +1395,32 @@
"\t-h\t--hostname\tDisplay first resolved host name\n" \
"\t-s\t--silent\tDon't ever display error messages.")
+#define ipcrm_trivial_usage \
+ "[-[MQS] key] [-[mqs] id]"
+#define ipcrm_full_usage \
+ "The upper-case options MQS are used to remove a shared memory\n" \
+ "segment by an shmkey value. The lower-case options mqs are used\n" \
+ "to remove a segment by shmid value.\n" \
+ "\t-m | -M\tRemove the memory segment after the last detatch\n" \
+ "\t-q | -Q\tRemove the message queue\n" \
+ "\t-s | -S\tRemove the semaphore\n"
+
+#define ipcs_trivial_usage \
+ "[[-smq] -i shmid] | [[-asmq] [-tclup]]"
+#define ipcs_full_usage \
+ "\t-i\tspecify a specific resource id\n" \
+ "Resource specification:\n" \
+ "\t-m\tshared memory segments\n" \
+ "\t-q\tmessage queues\n" \
+ "\t-s\tsempahore arrays\n" \
+ "\t-a\tall (default)\n" \
+ "Output format:\n" \
+ "\t-t\ttime\n" \
+ "\t-p\tpid\n" \
+ "\t-s\tcreator\n" \
+ "\t-a\tlimits\n" \
+ "\t-i\tsummary\n"
+
#define iplink_trivial_usage \
"{ set DEVICE { up | down | arp { on | off } | show [ DEVICE ] }"
#define iplink_full_usage \
@@ -2080,18 +2106,30 @@
"$ printf \"Val=%d\\n\" 5\n" \
"Val=5\n"
+#if !defined(CONFIG_SELINUX) && !defined(CONFIG_PS_FEATURE_WIDE)
+#define USAGE_PS "\n\tThis version of ps accepts no options."
+#else
+#define USAGE_PS "\nOptions:"
+#endif
#ifdef CONFIG_SELINUX
#define USAGE_NONSELINUX(a)
#else
#define USAGE_NONSELINUX(a) a
#endif
+#ifdef CONFIG_PS_FEATURE_WIDE
+#define USAGE_PS_WIDE(a) a
+#else
+#define USAGE_PS_WIDE(a)
+#endif
#define ps_trivial_usage \
""
#define ps_full_usage \
"Report process status\n" \
- USAGE_NONSELINUX("\n\tThis version of ps accepts no options.") \
- USAGE_SELINUX("\nOptions:\n\t-c\tshow SE Linux context")
+ USAGE_PS \
+ USAGE_SELINUX("\n\t-c\tshow SE Linux context") \
+ USAGE_PS_WIDE("\n\tw\twide output")
+
#define ps_example_usage \
"$ ps\n" \
View
@@ -397,6 +397,8 @@ CONFIG_DMESG=y
# CONFIG_GETOPT is not set
CONFIG_HEXDUMP=y
# CONFIG_HWCLOCK is not set
+# CONFIG_IPCRM is not set
+# CONFIG_IPCS is not set
# CONFIG_LOSETUP is not set
# CONFIG_MKSWAP is not set
CONFIG_MORE=y
View
@@ -216,6 +216,21 @@ config CONFIG_LOSETUP
file or block device, and to query the status of a loop device. This
version does not currently support enabling data encryption.
+config CONFIG_IPCRM
+ bool "ipcrm"
+ default n
+ help
+ The ipcrm utility allows the removal of System V interprocess
+ communication (IPC) objects and the associated data structures
+ from the system.
+
+config CONFIG_IPCS
+ bool "ipcs"
+ default n
+ help
+ The ipcs utility is used to provide information on the currently
+ allocated System V interprocess (IPC) objects in the system.
+
config CONFIG_MKSWAP
bool "mkswap"
default n
@@ -322,14 +337,18 @@ config CONFIG_FEATURE_MOUNT_LOOP
default n
depends on CONFIG_MOUNT || CONFIG_UMOUNT
help
- Enabling this feature allows mount to use the '-o' loop options,
- which lets you loop mount files. Mount will automagically setup and
- free the necessary loop devices so you do not need to mess with the
- 'losetup' utility unless you really want to. This is really
- only useful if you plan to loop mount files.
+ Enabling this feature allows automatic loopback mounts, meaning you can mount
+ filesystems contained in normal files as well as in block devices. The mount
+ and umount commands will detect you are trying to mount a file instead of a
+ block device, and transparently associate it with a loopback device (and free
+ the loopback device on unmount) for you.
+
+ You can still use the 'losetup' utility and mount the loopback device yourself
+ if you need to do something advanced, such as specify an offset or cryptographic
+ options to the loopback device.
config CONFIG_FEATURE_MTAB_SUPPORT
- bool " Support for a real /etc/mtab (instead of /proc/mounts)"
+ bool " Support for a /etc/mtab file (instead of symlink to /proc/mounts)"
default n
depends on CONFIG_MOUNT || CONFIG_UMOUNT
help
@@ -339,17 +358,9 @@ config CONFIG_FEATURE_MTAB_SUPPORT
BusyBox have a read-only root filesystem, so they will leave this
option disabled and BusyBox will use the /proc/mounts file.
-config CONFIG_FEATURE_MTAB_FILENAME
- string " mtab file location"
- default "/etc/mtab"
- depends on CONFIG_FEATURE_MTAB_SUPPORT
- help
- Some people have a read only root filesystem, but they also wish to
- have the 'mount' utility create an mtab file listing the filesystems
- which have been mounted. This option allows you to specify an alternative
- location for the mtab file, such as /var/mtab, or /tmp/mtab. The default
- value is /etc/mtab, which is where this file is located on most desktop
- Linux systems.
+ Note that even non-embedded developers probably want to have /etc/mtab
+ be a symlink to /proc/mounts, since otherwise mtab can get out of sync
+ with the real kernel mount state in numerous ways.
config CONFIG_READPROFILE
bool "readprofile"
View
@@ -34,6 +34,8 @@ UTILLINUX-$(CONFIG_FSCK_MINIX) +=fsck_minix.o
UTILLINUX-$(CONFIG_GETOPT) +=getopt.o
UTILLINUX-$(CONFIG_HEXDUMP) +=hexdump.o
UTILLINUX-$(CONFIG_HWCLOCK) +=hwclock.o
+UTILLINUX-$(CONFIG_IPCRM) +=ipcrm.o
+UTILLINUX-$(CONFIG_IPCS) +=ipcs.o
UTILLINUX-$(CONFIG_LOSETUP) +=losetup.o
UTILLINUX-$(CONFIG_MKFS_MINIX) +=mkfs_minix.o
UTILLINUX-$(CONFIG_MKSWAP) +=mkswap.o
Oops, something went wrong.

0 comments on commit 6eb1e41

Please sign in to comment.