warn(spec);
warn("%s", spec);
do_fstab(){	struct	fstab *fp;	char	*s;	long	priority;	struct	stat st;	int	isblk;	int	gotone = 0;#define PRIORITYEQ	"priority="#define NFSMNTPT	"nfsmntpt="#define PATH_MOUNT	"/sbin/mount_nfs"	while ((fp = getfsent()) != NULL) {		const char *spec;		if (strcmp(fp->fs_type, "sw") != 0)			continue;		spec = fp->fs_spec;		isblk = 0;		if ((s = strstr(fp->fs_mntops, PRIORITYEQ)) != NULL) {			s += sizeof(PRIORITYEQ) - 1;			priority = atol(s);		} else			priority = pri;		if ((s = strstr(fp->fs_mntops, NFSMNTPT)) != NULL) {			char *t, cmd[2*PATH_MAX+sizeof(PATH_MOUNT)+2];			/*			 * Skip this song and dance if we're only			 * doing block devices.			 */			if (tflag != NULL &&			    strcmp(tflag, "blk") == 0)				continue;			t = strpbrk(s, ",");			if (t != 0)				*t = '\0';			spec = strdup(s + strlen(NFSMNTPT));			if (t != 0)				*t = ',';			if (spec == NULL)				errx(1, "Out of memory");			if (strlen(spec) == 0) {				warnx("empty mountpoint");				free((char *)spec);				continue;			}			snprintf(cmd, sizeof(cmd), "%s %s %s",				PATH_MOUNT, fp->fs_spec, spec);			if (system(cmd) != 0) {				warnx("%s: mount failed", fp->fs_spec);				continue;			}		} else {			/*			 * Determine blk-ness.			 */			if (stat(spec, &st) < 0) {				warn(spec);				continue;			}			if (S_ISBLK(st.st_mode))				isblk = 1;		}		/*		 * Skip this type if we're told to.		 */		if (tflag != NULL) {			if (strcmp(tflag, "blk") == 0 && isblk == 0)				continue;			if (strcmp(tflag, "noblk") == 0 && isblk == 1)				continue;		}		if (swapctl(SWAP_ON, spec, (int)priority) < 0)			warn("%s", spec);		else {			gotone = 1;			printf("%s: adding %s as swap device at priority %d\n",			    __progname, fp->fs_spec, (int)priority);		}		if (spec != fp->fs_spec)			free((char *)spec);	}	if (gotone == 0)		exit(1);}