nfs.c (e5af0da1dcbfb1a4694150f9954554fb6df88819) nfs.c (af91062ee1408f7f5bb58389d355d29a5040c648)
1/*
2 * QEMU Block driver for native access to files on NFS shares
3 *
4 * Copyright (c) 2014-2017 Peter Lieven <pl@kamp.de>
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 542 unchanged lines hidden (view full) ---

551 g_free(file);
552 return ret;
553}
554
555static BlockdevOptionsNfs *nfs_options_qdict_to_qapi(QDict *options,
556 Error **errp)
557{
558 BlockdevOptionsNfs *opts = NULL;
1/*
2 * QEMU Block driver for native access to files on NFS shares
3 *
4 * Copyright (c) 2014-2017 Peter Lieven <pl@kamp.de>
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 542 unchanged lines hidden (view full) ---

551 g_free(file);
552 return ret;
553}
554
555static BlockdevOptionsNfs *nfs_options_qdict_to_qapi(QDict *options,
556 Error **errp)
557{
558 BlockdevOptionsNfs *opts = NULL;
559 QObject *crumpled = NULL;
560 Visitor *v;
561 const QDictEntry *e;
562 Error *local_err = NULL;
563
559 Visitor *v;
560 const QDictEntry *e;
561 Error *local_err = NULL;
562
564 crumpled = qdict_crumple_for_keyval_qiv(options, errp);
565 if (crumpled == NULL) {
563 v = qobject_input_visitor_new_flat_confused(options, errp);
564 if (!v) {
566 return NULL;
567 }
568
565 return NULL;
566 }
567
569 v = qobject_input_visitor_new_keyval(crumpled);
570 visit_type_BlockdevOptionsNfs(v, NULL, &opts, &local_err);
571 visit_free(v);
568 visit_type_BlockdevOptionsNfs(v, NULL, &opts, &local_err);
569 visit_free(v);
572 qobject_unref(crumpled);
573
574 if (local_err) {
575 error_propagate(errp, local_err);
576 return NULL;
577 }
578
579 /* Remove the processed options from the QDict (the visitor processes
580 * _all_ options in the QDict) */

--- 325 unchanged lines hidden ---
570
571 if (local_err) {
572 error_propagate(errp, local_err);
573 return NULL;
574 }
575
576 /* Remove the processed options from the QDict (the visitor processes
577 * _all_ options in the QDict) */

--- 325 unchanged lines hidden ---