Lines Matching +full:software +full:- +full:dl
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
62 struct deletelist *dl; in main() local
65 dl = NULL; in main()
67 while((opt = getopt(argc, argv, "d:p")) != -1) { in main()
74 if (dl == NULL) { in main()
75 dl = malloc(sizeof(*dl)); in main()
76 if (dl == NULL) in main()
78 bzero(dl, sizeof(*dl)); in main()
79 dl->last = dl; in main()
81 dl->last->next = malloc(sizeof(*dl)); in main()
82 if (dl->last->next == NULL) in main()
84 dl->last = dl->last->next; in main()
85 bzero(dl->last, sizeof(*dl)); in main()
87 dl->last->name = optarg; in main()
95 argc -= optind; in main()
98 if (argc == 0 && dump == 0 && dl == NULL) { in main()
104 if (fd == -1) in main()
107 res = read(fd, buf + i, sizeof(buf) - i); in main()
108 if (res == -1 && errno != EINTR) in main()
129 size -= sizeof(struct chrp_header); in main()
137 size -= i; in main()
143 for (;dl != NULL; dl = dl->next) { in main()
144 if (remove_var(common, size, dl->name) == 0) in main()
145 warnx("%s: no such variable", dl->name); in main()
148 for (; argc > 0; argc--, argv++) { in main()
155 if (append_var(common, size, *argv, cp) == -1) in main()
160 res = write(fd, buf + i, sizeof(buf) - i); in main()
161 if (res == -1 && errno != EINTR) in main()
170 if (close(fd) == -1) in main()
180 fprintf(stderr, "usage: nvram [-p] | [-d name ...] [name=value ...]\n"); in usage()
196 memmove(buf, buf + i, len - i); in remove_var()
197 memset(buf + len - i, '\0', i); in remove_var()
201 len -= i; in remove_var()
216 len -= i; in append_var()
221 return -1; in append_var()