/*! Return the value associated with the key "arg". */ static const char * get_arg_win32 (void *p_user_data, const char key[]) { _img_private_t *p_env = p_user_data; if (!strcmp (key, "source")) { return p_env->gen.source_name; } else if (!strcmp (key, "access-mode")) { switch (p_env->access_mode) { case _AM_IOCTL: return "ioctl"; case _AM_ASPI: return "ASPI"; case _AM_MMC_RDWR: return "MMC_RDWR"; case _AM_MMC_RDWR_EXCL: return "MMC_RDWR_EXCL"; case _AM_NONE: return "no access method"; } } else if (!strcmp (key, "scsi-tuple")) { return p_env->gen.scsi_tuple; } else if (!strcmp (key, "mmc-supported?")) { return is_mmc_supported(p_user_data) ? "true" : "false"; } return NULL; }
/*! Return the value associated with the key "arg". */ static const char * get_arg_freebsd (void *user_data, const char key[]) { _img_private_t *env = user_data; if (!strcmp (key, "source")) { return env->gen.source_name; } else if (!strcmp (key, "access-mode")) { switch (env->access_mode) { case _AM_IOCTL: return "ioctl"; case _AM_CAM: return "CAM"; case _AM_MMC_RDWR: return "MMC_RDWR"; case _AM_MMC_RDWR_EXCL: return "MMC_RDWR_EXCL"; case _AM_NONE: return "no access method"; } } else if (strcmp (key, "scsi-tuple") == 0) { if (env->gen.scsi_tuple == NULL) set_scsi_tuple_freebsd(env); return env->gen.scsi_tuple; } else if (!strcmp (key, "mmc-supported?")) { return is_mmc_supported(user_data) ? "true" : "false"; } return NULL; }