rpms/udev/devel modprobe_helper.c,NONE,1.1 modprobe,1.3,NONE
Harald Hoyer (harald)
fedora-extras-commits at redhat.com
Mon Jul 9 15:46:50 UTC 2007
- Previous message (by thread): rpms/udev/devel start_udev, 1.61, 1.62 udev-rules.patch, 1.37, 1.38 udev.nodes, 1.2, 1.3 udev.spec, 1.206, 1.207
- Next message (by thread): rpms/kernel/devel kernel-2.6.spec,1.3284,1.3285
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: harald
Update of /cvs/pkgs/rpms/udev/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24503
Added Files:
modprobe_helper.c
Removed Files:
modprobe
Log Message:
some speedups
--- NEW FILE modprobe_helper.c ---
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#define PNP_STR "pnp:d"
extern char **environ;
int main(int argc, char **argv)
{
int fd = 0;
int len, i;
if (getenv("MODPROBE_DEBUG")) {
int confd = open("/dev/console", O_RDWR);
if (confd >= 0) {
dup2(confd, 0);
dup2(confd, 1);
dup2(confd, 2);
close(confd);
}
fprintf(stderr, "modprobe ");
for (i=1; i < argc; i++)
fprintf(stderr, "%s ", argv[1]);
fprintf(stderr, "\n");
}
if (! getenv("MODPROBE_COLLECT"))
goto fallback;
if ( argc != 2 )
goto fallback;
fd = open("/dev/MODPROBE", O_CREAT|O_WRONLY|O_APPEND);
if (fd < 0)
goto fallback;
len = strlen(argv[1]);
if ((write(fd, argv[1], len) != len) || (write(fd, "\n", 1) != 1)) {
close(fd);
goto fallback;
}
close(fd);
exit(0);
fallback:
execve ("/sbin/modprobe", argv, environ);
}
--- modprobe DELETED ---
- Previous message (by thread): rpms/udev/devel start_udev, 1.61, 1.62 udev-rules.patch, 1.37, 1.38 udev.nodes, 1.2, 1.3 udev.spec, 1.206, 1.207
- Next message (by thread): rpms/kernel/devel kernel-2.6.spec,1.3284,1.3285
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list