aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
authorGravatar Eric Andersen <andersen@codepoet.org>2001-10-24 05:00:29 +0000
committerGravatar Eric Andersen <andersen@codepoet.org>2001-10-24 05:00:29 +0000
commitbdfd0d78bc44e73d693510e70087857785b3b521 (patch)
tree153a573095afac8d8d0ea857759ecabd77fb28b7 /procps
parent9260fc5552a3ee52eb95823aa6689d52a1ffd33c (diff)
downloadbusybox-bdfd0d78bc44e73d693510e70087857785b3b521.tar.gz
busybox-bdfd0d78bc44e73d693510e70087857785b3b521.tar.bz2
Major rework of the directory structure and the entire build system.
-Erik
Diffstat (limited to 'procps')
-rw-r--r--procps/Makefile40
-rw-r--r--procps/config.in17
-rw-r--r--procps/free.c4
-rw-r--r--procps/kill.c4
-rw-r--r--procps/pidof.c4
-rw-r--r--procps/ps.c32
-rw-r--r--procps/uptime.c6
7 files changed, 81 insertions, 26 deletions
diff --git a/procps/Makefile b/procps/Makefile
new file mode 100644
index 000000000..0e3bdc254
--- /dev/null
+++ b/procps/Makefile
@@ -0,0 +1,40 @@
+# Makefile for busybox
+#
+# Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
+#
+# 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+TOPDIR :=..
+L_TARGET := procps.a
+
+obj-y :=
+obj-n :=
+obj- :=
+
+obj-$(CONFIG_FREE) += free.o
+obj-$(CONFIG_KILL) += kill.o
+obj-$(CONFIG_PIDOF) += pidof.o
+obj-$(CONFIG_PS) += ps.o
+obj-$(CONFIG_RENICE) += renice.o
+obj-$(CONFIG_UPTIME) += uptime.o
+
+
+# Hand off to toplevel Rules.mak
+include $(TOPDIR)/Rules.mak
+
+clean:
+ rm -f $(L_TARGET) *.o core
+
diff --git a/procps/config.in b/procps/config.in
new file mode 100644
index 000000000..0c9c35c06
--- /dev/null
+++ b/procps/config.in
@@ -0,0 +1,17 @@
+#
+# For a description of the syntax of this configuration file,
+# see scripts/kbuild/config-language.txt.
+#
+
+mainmenu_option next_comment
+comment 'Process Utilities'
+
+bool 'free' CONFIG_FREE
+bool 'kill' CONFIG_KILL
+bool 'pidof' CONFIG_PIDOF
+bool 'ps' CONFIG_PS
+bool 'renice' CONFIG_RENICE
+bool 'uptime' CONFIG_UPTIME
+
+endmenu
+
diff --git a/procps/free.c b/procps/free.c
index 2e34a972c..cdc0d358c 100644
--- a/procps/free.c
+++ b/procps/free.c
@@ -2,8 +2,8 @@
/*
* Mini free implementation for busybox
*
- * Copyright (C) 1999,2000,2001 by Lineo, inc.
- * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
+ * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen
+ * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
*
* 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
diff --git a/procps/kill.c b/procps/kill.c
index 3884ebdf4..8b8a9922c 100644
--- a/procps/kill.c
+++ b/procps/kill.c
@@ -40,7 +40,7 @@ extern int kill_main(int argc, char **argv)
int whichApp, sig = SIGTERM;
const char *name;
-#ifdef BB_KILLALL
+#ifdef CONFIG_KILLALL
/* Figure out what we are trying to do here */
whichApp = (strcmp(applet_name, "killall") == 0)? KILLALL : KILL;
#else
@@ -108,7 +108,7 @@ extern int kill_main(int argc, char **argv)
argv++;
}
}
-#ifdef BB_KILLALL
+#ifdef CONFIG_KILLALL
else {
int all_found = TRUE;
pid_t myPid=getpid();
diff --git a/procps/pidof.c b/procps/pidof.c
index 50dffd387..5a40288dc 100644
--- a/procps/pidof.c
+++ b/procps/pidof.c
@@ -2,8 +2,8 @@
/*
* pidof implementation for busybox
*
- * Copyright (C) 2001 by Lineo, inc.
- * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
+ * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen
+ * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
*
* 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
diff --git a/procps/ps.c b/procps/ps.c
index 9e96a5402..fcb605a6e 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -2,15 +2,8 @@
/*
* Mini ps implementation(s) for busybox
*
- * Copyright (C) 1999,2000,2001 by Lineo, inc.
- * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
- *
- *
- * This contains _two_ implementations of ps for Linux. One uses the
- * traditional /proc virtual filesystem, and the other use the devps kernel
- * driver (written by Erik Andersen to avoid using /proc thereby saving 100k+).
- *
- *
+ * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen
+ * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
*
* 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 the Free
@@ -25,7 +18,12 @@
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ */
+
+/*
+ * This contains _two_ implementations of ps for Linux. One uses the
+ * traditional /proc virtual filesystem, and the other use the devps kernel
+ * driver (written by Erik Andersen to avoid using /proc thereby saving 100k+).
*/
#include <stdio.h>
@@ -44,7 +42,7 @@ static const int TERMINAL_WIDTH = 79; /* not 80 in case terminal has linefo
-#if ! defined BB_FEATURE_USE_DEVPS_PATCH
+#if ! defined CONFIG_FEATURE_USE_DEVPS_PATCH
/* The following is the first ps implementation --
* the one using the /proc virtual filesystem.
@@ -114,7 +112,7 @@ extern int ps_main(int argc, char **argv)
char path[32], sbuf[512];
char uidName[9];
int len, i, c;
-#ifdef BB_FEATURE_AUTOWIDTH
+#ifdef CONFIG_FEATURE_AUTOWIDTH
struct winsize win = { 0, 0, 0, 0 };
int terminal_width = TERMINAL_WIDTH;
#else
@@ -127,7 +125,7 @@ extern int ps_main(int argc, char **argv)
if (!dir)
error_msg_and_die("Can't open /proc");
-#ifdef BB_FEATURE_AUTOWIDTH
+#ifdef CONFIG_FEATURE_AUTOWIDTH
ioctl(fileno(stdout), TIOCGWINSZ, &win);
if (win.ws_col > 0)
terminal_width = win.ws_col - 1;
@@ -169,7 +167,7 @@ extern int ps_main(int argc, char **argv)
}
-#else /* BB_FEATURE_USE_DEVPS_PATCH */
+#else /* CONFIG_FEATURE_USE_DEVPS_PATCH */
/* The following is the second ps implementation --
@@ -187,7 +185,7 @@ extern int ps_main(int argc, char **argv)
pid_t* pid_array = NULL;
struct pid_info info;
char uidName[9];
-#ifdef BB_FEATURE_AUTOWIDTH
+#ifdef CONFIG_FEATURE_AUTOWIDTH
struct winsize win = { 0, 0, 0, 0 };
int terminal_width = TERMINAL_WIDTH;
#else
@@ -217,7 +215,7 @@ extern int ps_main(int argc, char **argv)
if (ioctl (fd, DEVPS_GET_PID_LIST, pid_array)<0)
perror_msg_and_die("\nDEVPS_GET_PID_LIST");
-#ifdef BB_FEATURE_AUTOWIDTH
+#ifdef CONFIG_FEATURE_AUTOWIDTH
ioctl(fileno(stdout), TIOCGWINSZ, &win);
if (win.ws_col > 0)
terminal_width = win.ws_col - 1;
@@ -262,5 +260,5 @@ extern int ps_main(int argc, char **argv)
exit (0);
}
-#endif /* BB_FEATURE_USE_DEVPS_PATCH */
+#endif /* CONFIG_FEATURE_USE_DEVPS_PATCH */
diff --git a/procps/uptime.c b/procps/uptime.c
index 6758d959e..85ff2233c 100644
--- a/procps/uptime.c
+++ b/procps/uptime.c
@@ -2,8 +2,8 @@
/*
* Mini uptime implementation for busybox
*
- * Copyright (C) 1999,2000,2001 by Lineo, inc.
- * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
+ * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen
+ * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
*
* 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
@@ -24,7 +24,7 @@
/* This version of uptime doesn't display the number of users on the system,
* since busybox init doesn't mess with utmp. For folks using utmp that are
* just dying to have # of users reported, feel free to write it as some type
- * of BB_FEATURE_UTMP_SUPPORT #define
+ * of CONFIG_FEATURE_UTMP_SUPPORT #define
*/
/* getopt not needed */