Lines Matching refs:item

143 	xfs_sharelist_t *item;
145 item = (xfs_sharelist_t *)malloc(sizeof (xfs_sharelist_t));
146 if (item != NULL)
147 (void) memset(item, '\0', sizeof (xfs_sharelist_t));
148 return (item);
161 xfs_sharelist_t *item, *prev;
174 item = alloc_sharelist();
175 if (item != NULL) {
176 item->description = strdup(notice[i]);
178 item->next = list;
179 prev = item;
180 list = item;
182 item->next = prev->next;
183 prev->next = item;
184 prev = item;
211 xfs_sharelist_t *item = NULL, *first = NULL, *last;
220 item = alloc_sharelist();
221 if (item != NULL) {
223 item->lineno = line;
224 item->description = strdup(buff);
226 first = item;
227 last = item;
229 last->next = item;
230 last = item;
240 item = alloc_sharelist();
241 if (item == NULL) {
244 first = item;
245 last = item;
247 last->next = item;
248 last = item;
250 item->lineno = line;
251 item->origline = strdup(buff);
261 item->persist = 1;
264 item->fstype = strdup(optarg);
267 item->options = strdup(optarg);
270 item->description = strdup(optarg);
273 item->group = strdup(optarg);
280 item->path = strdup(args[optind]);
291 item->group = strdup(optgroup);
294 item->resource =
299 if (item != NULL && item->fstype == NULL)
300 item->fstype = strdup("nfs");
317 xfs_sharelist_t *item;
319 for (item = list; item != NULL; item = item->next) {
320 if (item->path != NULL && strcmp(item->path, path) == 0)
321 return (item);
336 xfs_sharelist_t *item, *prev = NULL;
339 for (item = prev = list; item != NULL; item = item->next) {
341 if (item->path == NULL) {
342 prev = item;
346 if (proto == NULL || (strcmp(item->path, path) == 0 &&
347 (item->fstype != NULL && strcmp(item->fstype, proto) == 0)))
349 if (item->fstype == NULL &&
352 prev = item;
354 if (item != NULL) {
355 if (item == prev)
356 list = item->next; /* this must be the first one */
358 prev->next = item->next;
359 item->next = NULL;
360 dfs_free_list(item);
374 xfs_sharelist_t *item, *prev = NULL;
376 for (item = prev = list; item != NULL; item = item->next) {
378 if (item->path == NULL) {
379 prev = item;
382 if (strcmp(item->origline, line) == 0)
384 prev = item;
386 if (item != NULL) {
387 if (item == prev)
388 list = item->next; /* this must be the first one */
390 prev->next = item->next;
391 item->next = NULL;
392 dfs_free_list(item);
407 xfs_sharelist_t *item, *tmp;
411 item = alloc_sharelist();
412 if (item != NULL) {
419 item->path = sa_get_share_attr(share, "path");
420 item->resource = sa_get_share_attr(share, "resource");
421 item->group = groupname;
422 item->fstype = strdup(proto);
423 item->options = sa_proto_legacy_format(proto, share, 1);
424 if (item->options != NULL && strlen(item->options) == 0) {
425 free(item->options);
426 item->options = NULL;
428 item->description = sa_get_share_description(share);
429 if (item->description != NULL &&
430 strlen(item->description) == 0) {
431 sa_free_share_description(item->description);
432 item->description = NULL;
435 list = item;
439 tmp->next = item;
455 xfs_sharelist_t *item;
459 for (item = list; item != NULL; item = item->next) {
460 if (item->path != NULL) {
461 if (*item->path == '/') {
464 (item->fstype != NULL) ? "-F " : "",
465 (item->fstype != NULL) ? item->fstype : "",
466 (item->options != NULL) ? " -o " : "",
467 (item->options != NULL) ?
468 item->options : "",
469 (item->description != NULL) ?
471 (item->description != NULL) ?
472 item->description : "",
473 (item->description != NULL) ? "\"" : "",
474 item->path,
475 ((item->resource != NULL) ||
476 (item->group != NULL)) ? " " : "",
477 (item->resource != NULL) ?
478 item->resource : "",
479 item->group != NULL ? "@" : "",
480 item->group != NULL ? item->group : "");
482 (void) fprintf(dfstab, "%s", item->origline);
485 if (item->description != NULL)
486 (void) fprintf(dfstab, "%s", item->description);
488 (void) fprintf(dfstab, "%s", item->origline);
1290 xfs_sharelist_t *list, *item;
1304 item = finddfsentry(list, path);
1306 if (item == NULL) {