| plan 9 kernel history: overview | file list | diff list |
2000/0405/boot/bootcache.c (diff list | history)
| 2000/0405/sys/src/9/boot/bootcache.c:2,14 – 2001/0527/sys/src/9/boot/bootcache.c:2,16 (short | long) | ||
| 2000/0405 | #include <libc.h> #include <../boot/boot.h> | |
| 2001/0527 | uchar statbuf[STATMAX]; | |
| 2000/0405 | int cache(int fd) { int argc, i, p[2]; | |
| 2001/0527 | char *argv[5], bd[32], buf[256], partition[64], *pp; | |
| 2000/0405 |
| |
| 2001/0527 | if(stat("/cfs", statbuf, sizeof statbuf) < 0) | |
| 2000/0405 | return fd; *partition = 0; | |
| 2000/0405/sys/src/9/boot/bootcache.c:19,25 – 2001/0527/sys/src/9/boot/bootcache.c:21,27 | ||
| 2000/0405 | for(i = 0; i < argc; i++){ if(strcmp(argv[i], "off") == 0) return fd; | |
| 2001/0527 | else if(stat(argv[i], statbuf, sizeof statbuf) >= 0){ | |
| 2000/0405 | strncpy(partition, argv[i], sizeof(partition)-1); partition[sizeof(partition)-1] = 0; } | |
| 2000/0405/sys/src/9/boot/bootcache.c:38,49 – 2001/0527/sys/src/9/boot/bootcache.c:40,51 | ||
| 2000/0405 | else if(strcmp("fs", &bd[i-2]) == 0) bd[i-2] = 0; sprint(partition, "%scache", bd); | |
| 2001/0527 | if(stat(partition, statbuf, sizeof statbuf) < 0) | |
| 2000/0405 | *bd = 0; } if(*bd == 0){ sprint(partition, "%scache", bootdisk); | |
| 2001/0527 | if(stat(partition, statbuf, sizeof statbuf) < 0) | |
| 2000/0405 | return fd; } } | |
| 2001/0527/sys/src/9/boot/bootcache.c:65,71 – 2001/0819/sys/src/9/boot/bootcache.c:65,71 (short | long) | ||
| 2000/0405 | if(fflag) execl("/cfs", "bootcfs", "-rs", "-f", partition, 0); else | |
| 2001/0819 | execl("/cfs", "bootcfs", "-ds", "-f", partition, 0); | |
| 2000/0405 | break; default: close(p[0]); | |
| 2001/0819/sys/src/9/boot/bootcache.c:2,8 – 2001/0820/sys/src/9/boot/bootcache.c:2,8 (short | long) | ||
| 2000/0405 | #include <libc.h> #include <../boot/boot.h> | |
| 2001/0527 |
| |
| 2001/0820 | uchar statbuf[Statsz]; | |
| 2001/0527 | ||
| 2000/0405 | int cache(int fd) | |
| 2001/0819/sys/src/9/boot/bootcache.c:65,71 – 2001/0820/sys/src/9/boot/bootcache.c:65,71 | ||
| 2000/0405 | if(fflag) execl("/cfs", "bootcfs", "-rs", "-f", partition, 0); else | |
| 2001/0819 |
| |
| 2001/0820 | execl("/cfs", "bootcfs", "-s", "-f", partition, 0); | |
| 2000/0405 | break; default: close(p[0]); | |
| 2001/0820/sys/src/9/boot/bootcache.c:17,23 – 2001/1117/sys/src/9/boot/bootcache.c:17,23 (short | long) | ||
| 2000/0405 | readfile("#e/cfs", buf, sizeof(buf)); if(*buf){ | |
| 2001/1117 | argc = tokenize(buf, argv, 4); | |
| 2000/0405 | for(i = 0; i < argc; i++){ if(strcmp(argv[i], "off") == 0) return fd; | |
| 2001/1117/sys/src/9/boot/bootcache.c:10,16 – 2002/1130/sys/src/9/boot/bootcache.c:10,16 (short | long) | ||
| 2000/0405 | int argc, i, p[2]; | |
| 2001/0527 | char *argv[5], bd[32], buf[256], partition[64], *pp; | |
| 2000/0405 | ||
| 2001/0527 |
| |
| 2002/1130 | if(stat("/boot/cfs", statbuf, sizeof statbuf) < 0) | |
| 2000/0405 | return fd; *partition = 0; | |
| 2001/1117/sys/src/9/boot/bootcache.c:63,71 – 2002/1130/sys/src/9/boot/bootcache.c:63,71 | ||
| 2000/0405 | dup(p[0], 1); close(p[0]); if(fflag) | |
| 2002/1130 | execl("/boot/cfs", "bootcfs", "-rs", "-f", partition, 0); | |
| 2000/0405 | else | |
| 2001/0820 |
| |
| 2002/1130 | execl("/boot/cfs", "bootcfs", "-s", "-f", partition, 0); | |
| 2000/0405 | break; default: close(p[0]); | |