diff options
author | Karel Zak | 2006-12-07 00:26:28 +0100 |
---|---|---|
committer | Karel Zak | 2006-12-07 00:26:28 +0100 |
commit | 5213517f54c70a784c06ee85c066aa2b4f375c4b (patch) | |
tree | bd0b55ed9621bf27f70fc2e338a9816496246beb /mount/swapon.c | |
parent | Imported from util-linux-2.12k tarball. (diff) | |
download | kernel-qcow2-util-linux-5213517f54c70a784c06ee85c066aa2b4f375c4b.tar.gz kernel-qcow2-util-linux-5213517f54c70a784c06ee85c066aa2b4f375c4b.tar.xz kernel-qcow2-util-linux-5213517f54c70a784c06ee85c066aa2b4f375c4b.zip |
Imported from util-linux-2.12l tarball.
Diffstat (limited to 'mount/swapon.c')
-rw-r--r-- | mount/swapon.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mount/swapon.c b/mount/swapon.c index dce1bf877..17c45cbdd 100644 --- a/mount/swapon.c +++ b/mount/swapon.c @@ -306,6 +306,7 @@ main_swapon(int argc, char *argv[]) { while ((fstab = getmntent(fp)) != NULL) { char *special = fstab->mnt_fsname; int skip = 0; + int pri = priority; if (streq(fstab->mnt_type, MNTTYPE_SWAP) && !is_in_proc_swaps(special) @@ -316,12 +317,12 @@ main_swapon(int argc, char *argv[]) { for (opt = strtok(opts, ","); opt != NULL; opt = strtok(NULL, ",")) { if (strncmp(opt, "pri=", 4) == 0) - priority = atoi(opt+4); + pri = atoi(opt+4); if (strcmp(opt, "noauto") == 0) skip = 1; } if (!skip) - status |= do_swapon(special, priority); + status |= do_swapon(special, pri); } } fclose(fp); |