diff options
author | Roland McGrath <roland@gnu.org> | 2002-06-26 18:19:07 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-06-26 18:19:07 +0000 |
commit | dd4370e31e548374a76b52e9aece8eae9669abba (patch) | |
tree | ed90dbc0a0ae38fb982bc960250b42dae3687589 | |
parent | 3556ae180ca253e447cbc1f0caf92ef65681e1aa (diff) |
2002-06-26 Roland McGrath <roland@frob.com>
* swapon.c (swaponoff): Fix last change.
-rw-r--r-- | sutils/swapon.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/sutils/swapon.c b/sutils/swapon.c index a50cd41d..acacf48c 100644 --- a/sutils/swapon.c +++ b/sutils/swapon.c @@ -383,15 +383,18 @@ swaponoff (const char *file, int add) return 0; } } - if (err) - error (12, err, "Cannot get privileged ports"); - - err = vm_set_default_memory_manager (host, &def_pager); - mach_port_deallocate (mach_task_self (), host); - if (err) - error (13, err, "Cannot get default pager port"); - if (def_pager == MACH_PORT_NULL) - error (14, 0, "No default pager (memory manager) is running!"); + else + { + if (err) + error (12, err, "Cannot get privileged ports"); + + err = vm_set_default_memory_manager (host, &def_pager); + mach_port_deallocate (mach_task_self (), host); + if (err) + error (13, err, "Cannot get default pager port"); + if (def_pager == MACH_PORT_NULL) + error (14, 0, "No default pager (memory manager) is running!"); + } } if (old_protocol) |