projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
terminate swap list with NODEV, not 0: 0 is a valid (if unusual) dev
[unix-history]
/
usr
/
src
/
usr.sbin
/
config
/
mkswapconf.c
diff --git
a/usr/src/usr.sbin/config/mkswapconf.c
b/usr/src/usr.sbin/config/mkswapconf.c
index
9f3e750
..
21a39ac
100644
(file)
--- a/
usr/src/usr.sbin/config/mkswapconf.c
+++ b/
usr/src/usr.sbin/config/mkswapconf.c
@@
-1,12
+1,13
@@
/*
* Copyright (c) 1980 Regents of the University of California.
/*
* Copyright (c) 1980 Regents of the University of California.
- * All rights reserved. The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+ * All rights reserved.
+ *
+ * %sccs.include.redist.c%
*/
#ifndef lint
*/
#ifndef lint
-static char sccsid[] = "@(#)mkswapconf.c 5.
3
(Berkeley) %G%";
-#endif
not lint
+static char sccsid[] = "@(#)mkswapconf.c 5.
11
(Berkeley) %G%";
+#endif
/* not lint */
/*
* Build a swap configuration file.
/*
* Build a swap configuration file.
@@
-36,7
+37,7
@@
do_swap(fl)
register struct file_list *fl;
{
FILE *fp;
register struct file_list *fl;
{
FILE *fp;
- char swapname[80]
, *cp
;
+ char swapname[80];
register struct file_list *swap;
dev_t dev;
register struct file_list *swap;
dev_t dev;
@@
-50,8
+51,8
@@
do_swap(fl)
perror(path(swapname));
exit(1);
}
perror(path(swapname));
exit(1);
}
- fprintf(fp, "#include \"
../h
/param.h\"\n");
- fprintf(fp, "#include \"
../h
/conf.h\"\n");
+ fprintf(fp, "#include \"
sys
/param.h\"\n");
+ fprintf(fp, "#include \"
sys
/conf.h\"\n");
fprintf(fp, "\n");
/*
* If there aren't any swap devices
fprintf(fp, "\n");
/*
* If there aren't any swap devices
@@
-66,8
+67,6
@@
do_swap(fl)
}
fprintf(fp, "dev_t\trootdev = makedev(%d, %d);\n",
major(fl->f_rootdev), minor(fl->f_rootdev));
}
fprintf(fp, "dev_t\trootdev = makedev(%d, %d);\n",
major(fl->f_rootdev), minor(fl->f_rootdev));
- fprintf(fp, "dev_t\targdev = makedev(%d, %d);\n",
- major(fl->f_argdev), minor(fl->f_argdev));
fprintf(fp, "dev_t\tdumpdev = makedev(%d, %d);\n",
major(fl->f_dumpdev), minor(fl->f_dumpdev));
fprintf(fp, "\n");
fprintf(fp, "dev_t\tdumpdev = makedev(%d, %d);\n",
major(fl->f_dumpdev), minor(fl->f_dumpdev));
fprintf(fp, "\n");
@@
-78,7
+77,7
@@
do_swap(fl)
major(dev), minor(dev), swap->f_swapsize, swap->f_fn);
swap = swap->f_next;
} while (swap && swap->f_type == SWAPSPEC);
major(dev), minor(dev), swap->f_swapsize, swap->f_fn);
swap = swap->f_next;
} while (swap && swap->f_type == SWAPSPEC);
- fprintf(fp, "\t{
0
, 0, 0 }\n");
+ fprintf(fp, "\t{
NODEV
, 0, 0 }\n");
fprintf(fp, "};\n");
fclose(fp);
return (swap);
fprintf(fp, "};\n");
fclose(fp);
return (swap);