aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/gluster.c40
-rw-r--r--block/nfs.c4
2 files changed, 22 insertions, 22 deletions
diff --git a/block/gluster.c b/block/gluster.c
index 891c13b7ce..a0a74e49fd 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -48,7 +48,7 @@ typedef struct BDRVGlusterState {
struct glfs_fd *fd;
char *logfile;
bool supports_seek_data;
- int debug_level;
+ int debug;
} BDRVGlusterState;
typedef struct BDRVGlusterReopenState {
@@ -434,7 +434,7 @@ static struct glfs *qemu_gluster_glfs_init(BlockdevOptionsGluster *gconf,
}
}
- ret = glfs_set_logging(glfs, gconf->logfile, gconf->debug_level);
+ ret = glfs_set_logging(glfs, gconf->logfile, gconf->debug);
if (ret < 0) {
goto out;
}
@@ -788,17 +788,17 @@ static int qemu_gluster_open(BlockDriverState *bs, QDict *options,
filename = qemu_opt_get(opts, GLUSTER_OPT_FILENAME);
- s->debug_level = qemu_opt_get_number(opts, GLUSTER_OPT_DEBUG,
- GLUSTER_DEBUG_DEFAULT);
- if (s->debug_level < 0) {
- s->debug_level = 0;
- } else if (s->debug_level > GLUSTER_DEBUG_MAX) {
- s->debug_level = GLUSTER_DEBUG_MAX;
+ s->debug = qemu_opt_get_number(opts, GLUSTER_OPT_DEBUG,
+ GLUSTER_DEBUG_DEFAULT);
+ if (s->debug < 0) {
+ s->debug = 0;
+ } else if (s->debug > GLUSTER_DEBUG_MAX) {
+ s->debug = GLUSTER_DEBUG_MAX;
}
gconf = g_new0(BlockdevOptionsGluster, 1);
- gconf->debug_level = s->debug_level;
- gconf->has_debug_level = true;
+ gconf->debug = s->debug;
+ gconf->has_debug = true;
logfile = qemu_opt_get(opts, GLUSTER_OPT_LOGFILE);
s->logfile = g_strdup(logfile ? logfile : GLUSTER_LOGFILE_DEFAULT);
@@ -874,8 +874,8 @@ static int qemu_gluster_reopen_prepare(BDRVReopenState *state,
qemu_gluster_parse_flags(state->flags, &open_flags);
gconf = g_new0(BlockdevOptionsGluster, 1);
- gconf->debug_level = s->debug_level;
- gconf->has_debug_level = true;
+ gconf->debug = s->debug;
+ gconf->has_debug = true;
gconf->logfile = g_strdup(s->logfile);
gconf->has_logfile = true;
reop_s->glfs = qemu_gluster_init(gconf, state->bs->filename, NULL, errp);
@@ -1011,14 +1011,14 @@ static int qemu_gluster_create(const char *filename,
char *tmp = NULL;
gconf = g_new0(BlockdevOptionsGluster, 1);
- gconf->debug_level = qemu_opt_get_number_del(opts, GLUSTER_OPT_DEBUG,
- GLUSTER_DEBUG_DEFAULT);
- if (gconf->debug_level < 0) {
- gconf->debug_level = 0;
- } else if (gconf->debug_level > GLUSTER_DEBUG_MAX) {
- gconf->debug_level = GLUSTER_DEBUG_MAX;
- }
- gconf->has_debug_level = true;
+ gconf->debug = qemu_opt_get_number_del(opts, GLUSTER_OPT_DEBUG,
+ GLUSTER_DEBUG_DEFAULT);
+ if (gconf->debug < 0) {
+ gconf->debug = 0;
+ } else if (gconf->debug > GLUSTER_DEBUG_MAX) {
+ gconf->debug = GLUSTER_DEBUG_MAX;
+ }
+ gconf->has_debug = true;
gconf->logfile = qemu_opt_get_del(opts, GLUSTER_OPT_LOGFILE);
if (!gconf->logfile) {
diff --git a/block/nfs.c b/block/nfs.c
index d08278323f..a490660027 100644
--- a/block/nfs.c
+++ b/block/nfs.c
@@ -134,7 +134,7 @@ static int nfs_parse_uri(const char *filename, QDict *options, Error **errp)
qdict_put(options, "page-cache-size",
qstring_from_str(qp->p[i].value));
} else if (!strcmp(qp->p[i].name, "debug")) {
- qdict_put(options, "debug-level",
+ qdict_put(options, "debug",
qstring_from_str(qp->p[i].value));
} else {
error_setg(errp, "Unknown NFS parameter name: %s",
@@ -165,7 +165,7 @@ static bool nfs_has_filename_options_conflict(QDict *options, Error **errp)
!strcmp(qe->key, "tcp-syn-count") ||
!strcmp(qe->key, "readahead-size") ||
!strcmp(qe->key, "page-cache-size") ||
- !strcmp(qe->key, "debug-level") ||
+ !strcmp(qe->key, "debug") ||
strstart(qe->key, "server.", NULL))
{
error_setg(errp, "Option %s cannot be used with a filename",