Lines Matching refs:toybuf
53 len = read(fd, toybuf, 64); in make_device()
56 toybuf[len] = 0; in make_device()
61 sscanf(toybuf, "%u:%u", &major, &minor); in make_device()
226 sprintf(toybuf, "/dev/%s", custom_name); in make_device()
229 dir = opendir(toybuf); in make_device()
231 else mkdir(toybuf, 0755); in make_device()
235 sprintf(toybuf, "/dev/%s", device_name); in make_device()
238 unlink(toybuf); in make_device()
242 if (strchr(device_name, '/')) mkpath(toybuf); in make_device()
243 if (mknod(toybuf, mode | type, dev_makedev(major, minor)) && in make_device()
245 perror_exit("mknod %s failed", toybuf); in make_device()
249 perror_exit("malloc failed while creating symlink to %s", toybuf); in make_device()
251 if(symlink(toybuf, symlink_name)){ in make_device()
253 perror_exit("symlink creation failed for %s", toybuf); in make_device()
258 if (type == S_IFBLK) close(open(toybuf, O_RDONLY)); // scan for partitions in make_device()
260 if (CFG_MDEV_CONF) mode=chown(toybuf, uid, gid); in make_device()