1
Index: oss4-4.2-build2004/os_cmd/Linux/ossdetect/ossdetect.c
2
===================================================================
3
--- oss4-4.2-build2004.orig/os_cmd/Linux/ossdetect/ossdetect.c
4
+++ oss4-4.2-build2004/os_cmd/Linux/ossdetect/ossdetect.c
15
#define OSSLIBDIRLEN 512
16
static char *osslibdir = NULL;
17
+static char *groupname = "root";
19
static int usb_ok = 0;
22
if (l > 0 && tmp[l - 1] == '\n')
25
- if (strncmp (tmp, "OSSLIBDIR=", 10) == 0)
26
+ if (strncmp (tmp, "OSSETCDIR=", 10) == 0)
28
l = snprintf (name, sizeof (name), "%s", &tmp[10]);
29
if ((l >= OSSLIBDIRLEN) || (l < 0))
34
- fprintf (stderr, "OSSLIBDIR not set in /etc/oss.conf, using default "
36
+ fprintf (stderr, "OSSETCDIR not set in /etc/oss.conf, using default "
41
- snprintf (name, sizeof (name), "/usr/lib/oss");
42
+ snprintf (name, sizeof (name), "/etc/oss4");
50
+ struct group *grpstruct;
51
+ if((grpstruct = getgrnam(groupname)) == NULL)
53
+ fprintf (stderr, "getgrnam() error\n");
57
if ((f = fopen ("/proc/opensound/devfiles", "r")) == NULL)
59
perror ("/proc/opensound/devfiles");
61
printf ("mknod %s c %d %d -m %o\n", dev, major, minor, node_m);
62
if (mknod (dev, node_m, makedev (major, minor)) == -1)
65
+ chown(dev, 0, grpstruct->gr_gid);
73
- while ((i = getopt(argc, argv, "L:a:dilm:uv")) != EOF)
74
+ while ((i = getopt(argc, argv, "L:a:dg:ilm:uv")) != EOF)
93
- load_devlist ("etc/devices.list", 0);
94
+ load_devlist ("devices.list", 0);
96
if (stat ("/etc/oss_3rdparty", &st) != -1)
97
load_devlist ("/etc/oss_3rdparty", 1);
101
snprintf (instfname, sizeof (instfname), "%s/%s", osslibdir,
102
- "etc/installed_drivers");
103
+ "installed_drivers");
105
if ((f = fopen (instfname, "w")) == NULL)
107
Index: oss4-4.2-build2004/os_cmd/Linux/ossdetect/ossdetect.man
108
===================================================================
109
--- oss4-4.2-build2004.orig/os_cmd/Linux/ossdetect/ossdetect.man
110
+++ oss4-4.2-build2004/os_cmd/Linux/ossdetect/ossdetect.man
114
The ossdetect application performs automatic detection of soundcards.
115
-The application looks at the /usr/lib/oss/etc/device.list and performs
116
+The application looks at the $OSSETCDIR/device.list and performs
117
automatic detection. It will create a file with the list of the configured
118
-drivers in /usr/lib/oss/etc/installed_drivers.
119
+drivers in $OSSETCDIR/installed_drivers.
120
+OSSETCDIR is decided by reading /etc/oss.conf, and defaults to /etc/oss4.
122
The Input Multiplexer driver (IMUX) is not configured by default and
123
can be added to the OSS configuration using the -i option.
125
-d Create device file links.
126
-i Adds the oss_imux driver.
127
-m<mode> Create nodes with permissions set to octal <mode>.
128
+-g<group> Create nodes with group ownership set to <group>.
129
-u Adds the oss_userdev driver.
131
-L<path> Use <path> as root directory for OSS files.
133
ossdevlinks(1), ossinfo(1)