Lines Matching defs:name
88 char *name;
573 void append_pathname(pathname_t * name, char *str)
579 if (len && *str == '/' && name->len == 0) {
586 name->path = realloc(name->path, name->len + 1 + len);
587 strcpy(&name->path[name->len], str);
588 name->len += len;
593 attr_list_path(pathname_t * name, char *buffer, const int buffersize, int flags,
600 rval = attr_list(name->path, buffer, buffersize, flags, cursor);
603 separate_pathname(name, buf, &newname);
613 int attr_remove_path(pathname_t * name, const char *attrname, int flags)
619 rval = attr_remove(name->path, attrname, flags);
622 separate_pathname(name, buf, &newname);
632 attr_set_path(pathname_t * name, const char *attrname, const char *attrvalue,
639 rval = attr_set(name->path, attrname, attrvalue, valuelength, flags);
642 separate_pathname(name, buf, &newname);
667 int creat_path(pathname_t * name, mode_t mode)
673 rval = creat(name->path, mode);
676 separate_pathname(name, buf, &newname);
792 void fent_to_name(pathname_t * name, flist_t * flp, fent_t * fep)
802 fent_to_name(name, &flist[FT_DIR], pfep);
803 append_pathname(name, "/");
807 append_pathname(name, buf);
825 void free_pathname(pathname_t * name)
827 if (name->path) {
828 free(name->path);
829 name->path = NULL;
830 name->len = 0;
834 int generate_fname(fent_t * fep, int ft, pathname_t * name, int *idp, int *v)
846 fent_to_name(name, &flist[FT_DIR], fep);
847 append_pathname(name, "/");
849 append_pathname(name, buf);
862 get_fname(int which, long r, pathname_t * name, flist_t ** flpp, fent_t ** fepp,
889 if (name)
890 fent_to_name(name, flp, fep);
915 void init_pathname(pathname_t * name)
917 name->len = 0;
918 name->path = NULL;
921 int lchown_path(pathname_t * name, uid_t owner, gid_t group)
927 rval = lchown(name->path, owner, group);
930 separate_pathname(name, buf, &newname);
993 int lstat64_path(pathname_t * name, struct stat64 *sbuf)
999 rval = lstat64(name->path, sbuf);
1002 separate_pathname(name, buf, &newname);
1027 int mkdir_path(pathname_t * name, mode_t mode)
1033 rval = mkdir(name->path, mode);
1036 separate_pathname(name, buf, &newname);
1045 int mknod_path(pathname_t * name, mode_t mode, dev_t dev)
1051 rval = mknod(name->path, mode, dev);
1054 separate_pathname(name, buf, &newname);
1083 int open_path(pathname_t * name, int oflag)
1089 rval = open(name->path, oflag);
1092 separate_pathname(name, buf, &newname);
1101 DIR *opendir_path(pathname_t * name)
1107 rval = opendir(name->path);
1110 separate_pathname(name, buf, &newname);
1131 if (strcmp(arg, p->name) == 0) {
1140 int readlink_path(pathname_t * name, char *lbuf, size_t lbufsiz)
1146 rval = readlink(name->path, lbuf, lbufsiz-1);
1151 separate_pathname(name, buf, &newname);
1214 int rmdir_path(pathname_t * name)
1220 rval = rmdir(name->path);
1223 separate_pathname(name, buf, &newname);
1232 void separate_pathname(pathname_t * name, char *buf, pathname_t * newname)
1237 slash = strchr(name->path, '/');
1243 strcpy(buf, name->path);
1260 && x + strlen(p->name) >= WIDTH - 5)
1263 x += printf("%s ", p->name);
1279 p->name, p->freq, f,
1286 int stat64_path(pathname_t * name, struct stat64 *sbuf)
1292 rval = stat64(name->path, sbuf);
1295 separate_pathname(name, buf, &newname);
1304 int symlink_path(const char *name1, pathname_t * name)
1310 if (!strcmp(name1, name->path)) {
1311 printf("yikes! %s %s\n", name1, name->path);
1315 rval = symlink(name1, name->path);
1318 separate_pathname(name, buf, &newname);
1327 int truncate64_path(pathname_t * name, off64_t length)
1333 rval = truncate64(name->path, length);
1336 separate_pathname(name, buf, &newname);
1345 int unlink_path(pathname_t * name)
1351 rval = unlink(name->path);
1354 separate_pathname(name, buf, &newname);
1377 (" -f op_name=freq changes the frequency of option name to freq\n");
1387 printf(" -r specifies random name padding\n");
1528 printf("%d/%d: attr_remove - name %d not found at %s\n",