Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/util-linux/swaponoff.c

    r2725 r3232  
    88 */
    99
     10//usage:#define swapon_trivial_usage
     11//usage:       "[-a]" IF_FEATURE_SWAPON_PRI(" [-p PRI]") " [DEVICE]"
     12//usage:#define swapon_full_usage "\n\n"
     13//usage:       "Start swapping on DEVICE\n"
     14//usage:     "\n    -a  Start swapping on all swap devices"
     15//usage:    IF_FEATURE_SWAPON_PRI(
     16//usage:     "\n    -p PRI  Set swap device priority"
     17//usage:    )
     18//usage:
     19//usage:#define swapoff_trivial_usage
     20//usage:       "[-a] [DEVICE]"
     21//usage:#define swapoff_full_usage "\n\n"
     22//usage:       "Stop swapping on DEVICE\n"
     23//usage:     "\n    -a  Stop swapping on all swap devices"
     24
    1025#include "libbb.h"
    1126#include <mntent.h>
    12 #include <sys/swap.h>
     27#ifndef __BIONIC__
     28# include <sys/swap.h>
     29#endif
    1330
    1431#if ENABLE_FEATURE_MOUNT_LABEL
     
    1633#else
    1734# define resolve_mount_spec(fsname) ((void)0)
     35#endif
     36
     37#ifndef MNTTYPE_SWAP
     38# define MNTTYPE_SWAP "swap"
    1839#endif
    1940
     
    2748#define g_flags 0
    2849#endif
     50#define INIT_G() do { } while (0)
    2951
    3052static int swap_enable_disable(char *device)
     
    90112    int ret;
    91113
     114    INIT_G();
     115
    92116#if !ENABLE_FEATURE_SWAPON_PRI
    93117    ret = getopt32(argv, "a");
    94118#else
    95     opt_complementary = "p+";
     119    if (applet_name[5] == 'n')
     120        opt_complementary = "p+";
    96121    ret = getopt32(argv, (applet_name[5] == 'n') ? "ap:" : "a", &g_flags);
    97122
Note: See TracChangeset for help on using the changeset viewer.