summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>2008-09-02 23:19:36 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-09-02 23:19:36 +0200
commit593453115b777368252ca4231537ad2a9e6d8ffb (patch)
tree305fb4d30b29ac98e01e7cb268646b0a7e2480e6 /udev
parent44aff4cd6d74d230e4a97f8d59f780472b7cad6e (diff)
remove deprecated envp[] in main()
envp is not standardized, and may become invalid when environment variables are modified. Since udev never actually uses it, we can simply remove it. Should anyone miss it in future, they can use the standardized environ variable - like udev_rules.c does already.
Diffstat (limited to 'udev')
-rw-r--r--udev/test-udev.c2
-rw-r--r--udev/udev.h12
-rw-r--r--udev/udevadm.c10
-rw-r--r--udev/udevcontrol.c2
-rw-r--r--udev/udevd.c2
-rw-r--r--udev/udevinfo.c2
-rw-r--r--udev/udevmonitor.c2
-rw-r--r--udev/udevsettle.c2
-rw-r--r--udev/udevtest.c2
-rw-r--r--udev/udevtrigger.c2
10 files changed, 19 insertions, 19 deletions
diff --git a/udev/test-udev.c b/udev/test-udev.c
index 4d5881deae..07628f74fd 100644
--- a/udev/test-udev.c
+++ b/udev/test-udev.c
@@ -60,7 +60,7 @@ static void asmlinkage sig_handler(int signum)
}
}
-int main(int argc, char *argv[], char *envp[])
+int main(int argc, char *argv[])
{
struct sysfs_device *dev;
struct udevice *udev;
diff --git a/udev/udev.h b/udev/udev.h
index 94456749a8..da86365056 100644
--- a/udev/udev.h
+++ b/udev/udev.h
@@ -168,11 +168,11 @@ extern int unlink_secure(const char *filename);
extern size_t buf_get_line(const char *buf, size_t buflen, size_t cur);
/* udev commands */
-extern int udevmonitor(int argc, char *argv[], char *envp[]);
-extern int udevinfo(int argc, char *argv[], char *envp[]);
-extern int udevcontrol(int argc, char *argv[], char *envp[]);
-extern int udevtrigger(int argc, char *argv[], char *envp[]);
-extern int udevsettle(int argc, char *argv[], char *envp[]);
-extern int udevtest(int argc, char *argv[], char *envp[]);
+extern int udevmonitor(int argc, char *argv[]);
+extern int udevinfo(int argc, char *argv[]);
+extern int udevcontrol(int argc, char *argv[]);
+extern int udevtrigger(int argc, char *argv[]);
+extern int udevsettle(int argc, char *argv[]);
+extern int udevtest(int argc, char *argv[]);
#endif
diff --git a/udev/udevadm.c b/udev/udevadm.c
index 7adb7c5732..cb356c5252 100644
--- a/udev/udevadm.c
+++ b/udev/udevadm.c
@@ -49,20 +49,20 @@ void log_message(int priority, const char *format, ...)
struct command {
const char *name;
- int (*cmd)(int argc, char *argv[], char *envp[]);
+ int (*cmd)(int argc, char *argv[]);
const char *help;
int debug;
};
static const struct command cmds[];
-static int version(int argc, char *argv[], char *envp[])
+static int version(int argc, char *argv[])
{
printf("%s\n", VERSION);
return 0;
}
-static int help(int argc, char *argv[], char *envp[])
+static int help(int argc, char *argv[])
{
const struct command *cmd;
@@ -118,7 +118,7 @@ static const struct command cmds[] = {
{}
};
-int main(int argc, char *argv[], char *envp[])
+int main(int argc, char *argv[])
{
const char *command;
const char *pos;
@@ -157,7 +157,7 @@ int main(int argc, char *argv[], char *envp[])
for (cmd = cmds; cmd->name != NULL; cmd++) {
if (strcmp(cmd->name, command) == 0) {
debug = cmd->debug;
- rc = cmd->cmd(argc, argv, envp);
+ rc = cmd->cmd(argc, argv);
goto out;
}
}
diff --git a/udev/udevcontrol.c b/udev/udevcontrol.c
index a02bfc4d65..f4830d8423 100644
--- a/udev/udevcontrol.c
+++ b/udev/udevcontrol.c
@@ -36,7 +36,7 @@
static int sock = -1;
static int udev_log = 0;
-int udevcontrol(int argc, char *argv[], char *envp[])
+int udevcontrol(int argc, char *argv[])
{
static struct udevd_ctrl_msg ctrl_msg;
struct sockaddr_un saddr;
diff --git a/udev/udevd.c b/udev/udevd.c
index 654118e5a9..49159494c4 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -953,7 +953,7 @@ static void export_initial_seqnum(void)
}
}
-int main(int argc, char *argv[], char *envp[])
+int main(int argc, char *argv[])
{
int retval;
int fd;
diff --git a/udev/udevinfo.c b/udev/udevinfo.c
index 714a69c384..738ffc67de 100644
--- a/udev/udevinfo.c
+++ b/udev/udevinfo.c
@@ -234,7 +234,7 @@ static int stat_device(const char *name, int export, const char *prefix)
return 0;
}
-int udevinfo(int argc, char *argv[], char *envp[])
+int udevinfo(int argc, char *argv[])
{
int option;
struct udevice *udev = NULL;
diff --git a/udev/udevmonitor.c b/udev/udevmonitor.c
index 2430dd39a5..3b65bcae9b 100644
--- a/udev/udevmonitor.c
+++ b/udev/udevmonitor.c
@@ -123,7 +123,7 @@ static const char *search_key(const char *searchkey, const char *buf, size_t buf
return NULL;
}
-int udevmonitor(int argc, char *argv[], char *envp[])
+int udevmonitor(int argc, char *argv[])
{
struct sigaction act;
int option;
diff --git a/udev/udevsettle.c b/udev/udevsettle.c
index f00a38b4b7..11277f5a43 100644
--- a/udev/udevsettle.c
+++ b/udev/udevsettle.c
@@ -67,7 +67,7 @@ static void print_queue(const char *dir)
printf("\n\n");
}
-int udevsettle(int argc, char *argv[], char *envp[])
+int udevsettle(int argc, char *argv[])
{
char queuename[PATH_SIZE];
char filename[PATH_SIZE];
diff --git a/udev/udevtest.c b/udev/udevtest.c
index 7c6e3f9178..63603aad97 100644
--- a/udev/udevtest.c
+++ b/udev/udevtest.c
@@ -71,7 +71,7 @@ out:
return rc;
}
-int udevtest(int argc, char *argv[], char *envp[])
+int udevtest(int argc, char *argv[])
{
int force = 0;
const char *action = "add";
diff --git a/udev/udevtrigger.c b/udev/udevtrigger.c
index 3dd9109b8b..4a8f62ab5c 100644
--- a/udev/udevtrigger.c
+++ b/udev/udevtrigger.c
@@ -562,7 +562,7 @@ static void scan_failed(void)
}
}
-int udevtrigger(int argc, char *argv[], char *envp[])
+int udevtrigger(int argc, char *argv[])
{
int failed = 0;
const char *sockpath = NULL;