if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "test0");
+ Check_Type (strv, T_STRING);
const char *str = StringValueCStr (strv);
if (!str)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"str", "test0");
const char *optstr = !NIL_P (optstrv) ? StringValueCStr (optstrv) : NULL;
char **strlist;
+ Check_Type (strlistv, T_ARRAY);
{
int i, len;
len = RARRAY_LEN (strlistv);
}
int b = RTEST (bv);
int integer = NUM2INT (integerv);
+ Check_Type (fileinv, T_STRING);
const char *filein = StringValueCStr (fileinv);
if (!filein)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"filein", "test0");
+ Check_Type (fileoutv, T_STRING);
const char *fileout = StringValueCStr (fileoutv);
if (!fileout)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "test0rint");
+ Check_Type (valv, T_STRING);
const char *val = StringValueCStr (valv);
if (!val)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "test0rint64");
+ Check_Type (valv, T_STRING);
const char *val = StringValueCStr (valv);
if (!val)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "test0rbool");
+ Check_Type (valv, T_STRING);
const char *val = StringValueCStr (valv);
if (!val)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "test0rconststring");
+ Check_Type (valv, T_STRING);
const char *val = StringValueCStr (valv);
if (!val)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "test0rstring");
+ Check_Type (valv, T_STRING);
const char *val = StringValueCStr (valv);
if (!val)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "test0rstringlist");
+ Check_Type (valv, T_STRING);
const char *val = StringValueCStr (valv);
if (!val)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "test0rintbool");
+ Check_Type (valv, T_STRING);
const char *val = StringValueCStr (valv);
if (!val)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "test0rpvlist");
+ Check_Type (valv, T_STRING);
const char *val = StringValueCStr (valv);
if (!val)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "test0rvglist");
+ Check_Type (valv, T_STRING);
const char *val = StringValueCStr (valv);
if (!val)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "test0rlvlist");
+ Check_Type (valv, T_STRING);
const char *val = StringValueCStr (valv);
if (!val)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "test0rstat");
+ Check_Type (valv, T_STRING);
const char *val = StringValueCStr (valv);
if (!val)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "test0rstatvfs");
+ Check_Type (valv, T_STRING);
const char *val = StringValueCStr (valv);
if (!val)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "test0rhashtable");
+ Check_Type (valv, T_STRING);
const char *val = StringValueCStr (valv);
if (!val)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "add_drive");
+ Check_Type (filenamev, T_STRING);
const char *filename = StringValueCStr (filenamev);
if (!filename)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "add_cdrom");
+ Check_Type (filenamev, T_STRING);
const char *filename = StringValueCStr (filenamev);
if (!filename)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "add_drive_ro");
+ Check_Type (filenamev, T_STRING);
const char *filename = StringValueCStr (filenamev);
if (!filename)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "config");
+ Check_Type (qemuparamv, T_STRING);
const char *qemuparam = StringValueCStr (qemuparamv);
if (!qemuparam)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "set_qemu");
+ Check_Type (qemuv, T_STRING);
const char *qemu = StringValueCStr (qemuv);
if (!qemu)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "set_path");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "set_append");
+ Check_Type (appendv, T_STRING);
const char *append = StringValueCStr (appendv);
if (!append)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "mount");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"device", "mount");
+ Check_Type (mountpointv, T_STRING);
const char *mountpoint = StringValueCStr (mountpointv);
if (!mountpoint)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "touch");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "cat");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "ll");
+ Check_Type (directoryv, T_STRING);
const char *directory = StringValueCStr (directoryv);
if (!directory)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "ls");
+ Check_Type (directoryv, T_STRING);
const char *directory = StringValueCStr (directoryv);
if (!directory)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "read_lines");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "aug_init");
+ Check_Type (rootv, T_STRING);
const char *root = StringValueCStr (rootv);
if (!root)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "aug_defvar");
+ Check_Type (namev, T_STRING);
const char *name = StringValueCStr (namev);
if (!name)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "aug_defnode");
+ Check_Type (namev, T_STRING);
const char *name = StringValueCStr (namev);
if (!name)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"name", "aug_defnode");
+ Check_Type (exprv, T_STRING);
const char *expr = StringValueCStr (exprv);
if (!expr)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"expr", "aug_defnode");
+ Check_Type (valv, T_STRING);
const char *val = StringValueCStr (valv);
if (!val)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "aug_get");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "aug_set");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"path", "aug_set");
+ Check_Type (valv, T_STRING);
const char *val = StringValueCStr (valv);
if (!val)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "aug_insert");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"path", "aug_insert");
+ Check_Type (labelv, T_STRING);
const char *label = StringValueCStr (labelv);
if (!label)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "aug_rm");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "aug_mv");
+ Check_Type (srcv, T_STRING);
const char *src = StringValueCStr (srcv);
if (!src)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"src", "aug_mv");
+ Check_Type (destv, T_STRING);
const char *dest = StringValueCStr (destv);
if (!dest)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "aug_match");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "aug_ls");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "rm");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "rmdir");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "rm_rf");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "mkdir");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "mkdir_p");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
rb_raise (rb_eArgError, "%s: used handle after closing it", "chmod");
int mode = NUM2INT (modev);
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
int owner = NUM2INT (ownerv);
int group = NUM2INT (groupv);
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "exists");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "is_file");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "is_dir");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "pvcreate");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "vgcreate");
+ Check_Type (volgroupv, T_STRING);
const char *volgroup = StringValueCStr (volgroupv);
if (!volgroup)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"volgroup", "vgcreate");
char **physvols;
+ Check_Type (physvolsv, T_ARRAY);
{
int i, len;
len = RARRAY_LEN (physvolsv);
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "lvcreate");
+ Check_Type (logvolv, T_STRING);
const char *logvol = StringValueCStr (logvolv);
if (!logvol)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"logvol", "lvcreate");
+ Check_Type (volgroupv, T_STRING);
const char *volgroup = StringValueCStr (volgroupv);
if (!volgroup)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "mkfs");
+ Check_Type (fstypev, T_STRING);
const char *fstype = StringValueCStr (fstypev);
if (!fstype)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"fstype", "mkfs");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "sfdisk");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
int heads = NUM2INT (headsv);
int sectors = NUM2INT (sectorsv);
char **lines;
+ Check_Type (linesv, T_ARRAY);
{
int i, len;
len = RARRAY_LEN (linesv);
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "write_file");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"path", "write_file");
+ Check_Type (contentv, T_STRING);
const char *content = StringValueCStr (contentv);
if (!content)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "umount");
+ Check_Type (pathordevicev, T_STRING);
const char *pathordevice = StringValueCStr (pathordevicev);
if (!pathordevice)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "file");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
rb_raise (rb_eArgError, "%s: used handle after closing it", "command");
char **arguments;
+ Check_Type (argumentsv, T_ARRAY);
{
int i, len;
len = RARRAY_LEN (argumentsv);
rb_raise (rb_eArgError, "%s: used handle after closing it", "command_lines");
char **arguments;
+ Check_Type (argumentsv, T_ARRAY);
{
int i, len;
len = RARRAY_LEN (argumentsv);
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "stat");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "lstat");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "statvfs");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "tune2fs_l");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "blockdev_setro");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "blockdev_setrw");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "blockdev_getro");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "blockdev_getss");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "blockdev_getbsz");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "blockdev_setbsz");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "blockdev_getsz");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "blockdev_getsize64");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "blockdev_flushbufs");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "blockdev_rereadpt");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "upload");
+ Check_Type (filenamev, T_STRING);
const char *filename = StringValueCStr (filenamev);
if (!filename)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"filename", "upload");
+ Check_Type (remotefilenamev, T_STRING);
const char *remotefilename = StringValueCStr (remotefilenamev);
if (!remotefilename)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "download");
+ Check_Type (remotefilenamev, T_STRING);
const char *remotefilename = StringValueCStr (remotefilenamev);
if (!remotefilename)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"remotefilename", "download");
+ Check_Type (filenamev, T_STRING);
const char *filename = StringValueCStr (filenamev);
if (!filename)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "checksum");
+ Check_Type (csumtypev, T_STRING);
const char *csumtype = StringValueCStr (csumtypev);
if (!csumtype)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"csumtype", "checksum");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "tar_in");
+ Check_Type (tarfilev, T_STRING);
const char *tarfile = StringValueCStr (tarfilev);
if (!tarfile)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"tarfile", "tar_in");
+ Check_Type (directoryv, T_STRING);
const char *directory = StringValueCStr (directoryv);
if (!directory)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "tar_out");
+ Check_Type (directoryv, T_STRING);
const char *directory = StringValueCStr (directoryv);
if (!directory)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"directory", "tar_out");
+ Check_Type (tarfilev, T_STRING);
const char *tarfile = StringValueCStr (tarfilev);
if (!tarfile)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "tgz_in");
+ Check_Type (tarballv, T_STRING);
const char *tarball = StringValueCStr (tarballv);
if (!tarball)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"tarball", "tgz_in");
+ Check_Type (directoryv, T_STRING);
const char *directory = StringValueCStr (directoryv);
if (!directory)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "tgz_out");
+ Check_Type (directoryv, T_STRING);
const char *directory = StringValueCStr (directoryv);
if (!directory)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"directory", "tgz_out");
+ Check_Type (tarballv, T_STRING);
const char *tarball = StringValueCStr (tarballv);
if (!tarball)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "mount_ro");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"device", "mount_ro");
+ Check_Type (mountpointv, T_STRING);
const char *mountpoint = StringValueCStr (mountpointv);
if (!mountpoint)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "mount_options");
+ Check_Type (optionsv, T_STRING);
const char *options = StringValueCStr (optionsv);
if (!options)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"options", "mount_options");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"device", "mount_options");
+ Check_Type (mountpointv, T_STRING);
const char *mountpoint = StringValueCStr (mountpointv);
if (!mountpoint)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "mount_vfs");
+ Check_Type (optionsv, T_STRING);
const char *options = StringValueCStr (optionsv);
if (!options)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"options", "mount_vfs");
+ Check_Type (vfstypev, T_STRING);
const char *vfstype = StringValueCStr (vfstypev);
if (!vfstype)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"vfstype", "mount_vfs");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"device", "mount_vfs");
+ Check_Type (mountpointv, T_STRING);
const char *mountpoint = StringValueCStr (mountpointv);
if (!mountpoint)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "debug");
+ Check_Type (subcmdv, T_STRING);
const char *subcmd = StringValueCStr (subcmdv);
if (!subcmd)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"subcmd", "debug");
char **extraargs;
+ Check_Type (extraargsv, T_ARRAY);
{
int i, len;
len = RARRAY_LEN (extraargsv);
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "lvremove");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "vgremove");
+ Check_Type (vgnamev, T_STRING);
const char *vgname = StringValueCStr (vgnamev);
if (!vgname)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "pvremove");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "set_e2label");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"device", "set_e2label");
+ Check_Type (labelv, T_STRING);
const char *label = StringValueCStr (labelv);
if (!label)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "get_e2label");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "set_e2uuid");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"device", "set_e2uuid");
+ Check_Type (uuidv, T_STRING);
const char *uuid = StringValueCStr (uuidv);
if (!uuid)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "get_e2uuid");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "fsck");
+ Check_Type (fstypev, T_STRING);
const char *fstype = StringValueCStr (fstypev);
if (!fstype)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"fstype", "fsck");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "zero");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "grub_install");
+ Check_Type (rootv, T_STRING);
const char *root = StringValueCStr (rootv);
if (!root)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"root", "grub_install");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "cp");
+ Check_Type (srcv, T_STRING);
const char *src = StringValueCStr (srcv);
if (!src)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"src", "cp");
+ Check_Type (destv, T_STRING);
const char *dest = StringValueCStr (destv);
if (!dest)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "cp_a");
+ Check_Type (srcv, T_STRING);
const char *src = StringValueCStr (srcv);
if (!src)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"src", "cp_a");
+ Check_Type (destv, T_STRING);
const char *dest = StringValueCStr (destv);
if (!dest)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "mv");
+ Check_Type (srcv, T_STRING);
const char *src = StringValueCStr (srcv);
if (!src)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"src", "mv");
+ Check_Type (destv, T_STRING);
const char *dest = StringValueCStr (destv);
if (!dest)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "equal");
+ Check_Type (file1v, T_STRING);
const char *file1 = StringValueCStr (file1v);
if (!file1)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"file1", "equal");
+ Check_Type (file2v, T_STRING);
const char *file2 = StringValueCStr (file2v);
if (!file2)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "strings");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "strings_e");
+ Check_Type (encodingv, T_STRING);
const char *encoding = StringValueCStr (encodingv);
if (!encoding)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
"encoding", "strings_e");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "hexdump");
+ Check_Type (pathv, T_STRING);
const char *path = StringValueCStr (pathv);
if (!path)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "zerofree");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "pvresize");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "sfdisk_N");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
int cyls = NUM2INT (cylsv);
int heads = NUM2INT (headsv);
int sectors = NUM2INT (sectorsv);
+ Check_Type (linev, T_STRING);
const char *line = StringValueCStr (linev);
if (!line)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "sfdisk_l");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "sfdisk_kernel_geometry");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "sfdisk_disk_geometry");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
int activate = RTEST (activatev);
char **volgroups;
+ Check_Type (volgroupsv, T_ARRAY);
{
int i, len;
len = RARRAY_LEN (volgroupsv);
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "lvresize");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "resize2fs");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "find");
+ Check_Type (directoryv, T_STRING);
const char *directory = StringValueCStr (directoryv);
if (!directory)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "e2fsck_f");
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
rb_raise (rb_eArgError, "%s: used handle after closing it", "ntfs_3g_probe");
int rw = RTEST (rwv);
+ Check_Type (devicev, T_STRING);
const char *device = StringValueCStr (devicev);
if (!device)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "sh");
+ Check_Type (commandv, T_STRING);
const char *command = StringValueCStr (commandv);
if (!command)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "sh_lines");
+ Check_Type (commandv, T_STRING);
const char *command = StringValueCStr (commandv);
if (!command)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",
if (!g)
rb_raise (rb_eArgError, "%s: used handle after closing it", "glob_expand");
+ Check_Type (patternv, T_STRING);
const char *pattern = StringValueCStr (patternv);
if (!pattern)
rb_raise (rb_eTypeError, "expected string for parameter %s of %s",