| 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 | prev | next) | ||
| 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; } } | |