Lines Matching refs:size
45 convert_path(const char *path, char *fname, size_t size,
55 fname[size - 1] = '\0';
56 size--;
58 while ((p = strchr(path, '%')) != NULL && size != 0) {
59 len = MIN(size, p - path);
63 if ((size -= len) == 0)
69 len = snprintf(fname, size, "%d", (int)pip->pr_pid);
72 len = snprintf(fname, size, "%d", (int)pip->pr_uid);
75 len = snprintf(fname, size, "%d", (int)pip->pr_gid);
78 len = snprintf(fname, size, "%s", pip->pr_fname);
87 len = snprintf(fname, size, "%s", &exec[1]);
92 len = snprintf(fname, size, "%s", uts.nodename);
97 len = snprintf(fname, size, "%s", uts.machine);
100 len = snprintf(fname, size, "%ld", (long)time(NULL));
104 * getzonenamebyid() returns the size including the
108 size)) < 0)
109 len = snprintf(fname, size, "%d",
119 len = snprintf(fname, size, "%%%c", *p);
122 if (len >= size)
126 size -= len;
131 (void) strncpy(fname, path, size);