/*
 *  call-seq:
 *      Linux.mount(filename) -> array
 *
 *  Returns an array with all attributes
 *
 *      Linux.mount("none", "/coda", "coda", 0, MountOptions.new.pack)
 *
 */

static VALUE rb_linux_mount(obj, source, target, filesystemtype, mountflags, data)
	VALUE obj, source, target, filesystemtype, mountflags, data;
{
	int ret;
	VALUE retval;

	Check_Type(source, T_STRING);
	Check_Type(target, T_STRING);
	Check_Type(filesystemtype, T_STRING);
	Check_Type(mountflags, T_INTEGER);
	Check_Type(data, T_STRING);

	ret = mount(StringValueCStr(source), StringValueCStr(target), StringValueCStr(filesystemtype), (int)mountflags, StringValueCStr(data));
	if(ret != 0) {
		rb_sys_fail(StringValueCStr(target));
	}

	return ret;
		
}