Lines Matching defs:ptr
58 char type=0, user[64], group[64], *node, *ptr = line;
66 while (isspace(*ptr)) ptr++;
67 if (!*ptr || *ptr == '#') continue;
68 node = ptr;
70 while (*ptr && !isspace(*ptr)) ptr++;
71 if (*ptr) *(ptr++) = 0;
73 sscanf(ptr, "%c %o %63s %63s %u %u %u %u %u", &type, &mode,
91 ptr = toybuf;
92 } else ptr = node;
95 if (mkpathat(AT_FDCWD, ptr, mode, MKPATHAT_MKLAST | MKPATHAT_MAKE)) {
96 perror_msg("can't create directory '%s'", ptr);
100 if (stat(ptr, &st) || !S_ISREG(st.st_mode)) {
101 perror_msg("line %d: file '%s' does not exist", line_no, ptr);
104 } else if (mknod(ptr, mode, dev_makedev(major, minor + i*incr))) {
105 perror_msg("line %d: can't create node '%s'", line_no, ptr);
109 if (chown(ptr, uid, gid) || chmod(ptr, mode))
110 perror_msg("line %d: can't chown/chmod '%s'", line_no, ptr);