Displaying 2 results from an estimated 2 matches for "somedev".
Did you mean:
somedef
2019 Nov 05
0
[klibc:master] losetup: Use LOOP_CTL_GET_FREE to find free device
..._unused_loop_device (void)
{
- /* Just creating a device, say in /tmp, is probably a bad idea -
- people might have problems with backup or so.
- So, we just try /dev/loop[0-7]. */
char dev[20];
- char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" };
- int i, j, fd, somedev = 0, someloop = 0, permission = 0;
- struct stat statbuf;
- struct loop_info loopinfo;
-
- for (j = 0; j < SIZE(loop_formats); j++) {
- for(i = 0; i < 256; i++) {
- sprintf(dev, loop_formats[j], i);
- if (stat (dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) {
- somedev++...
2010 Mar 14
0
[patches] klibc review unsorted patch queue
..._unused_loop_device (void)
+{
+ /* Just creating a device, say in /tmp, is probably a bad idea -
+ people might have problems with backup or so.
+ So, we just try /dev/loop[0-7]. */
+ char dev[20];
+ char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" };
+ int i, j, fd, somedev = 0, someloop = 0, permission = 0;
+ struct stat statbuf;
+ struct loop_info loopinfo;
+
+ for (j = 0; j < SIZE(loop_formats); j++) {
+ for(i = 0; i < 256; i++) {
+ sprintf(dev, loop_formats[j], i);
+ if (stat (dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) {
+ somedev++...