[PATCH v1 09/34] qemu_domain_namespace.c: Rename qemuDomainAttachDeviceMknodData

Michal Privoznik posted 34 patches 5 years, 6 months ago
[PATCH v1 09/34] qemu_domain_namespace.c: Rename qemuDomainAttachDeviceMknodData
Posted by Michal Privoznik 5 years, 6 months ago
This structure is going to be used from not only device attach
code, but also when building the namespace. Moreover, the code
lives in a separate file so the chances of clashing with another
name are minimal.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/qemu/qemu_domain_namespace.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_domain_namespace.c b/src/qemu/qemu_domain_namespace.c
index e385cda64a..40c4fb36cb 100644
--- a/src/qemu/qemu_domain_namespace.c
+++ b/src/qemu/qemu_domain_namespace.c
@@ -1098,7 +1098,7 @@ qemuDomainNamespaceAvailable(qemuDomainNamespace ns G_GNUC_UNUSED)
 }
 
 
-struct qemuDomainAttachDeviceMknodData {
+struct qemuDomainMknodData {
     virQEMUDriverPtr driver;
     virDomainObjPtr vm;
     const char *file;
@@ -1117,7 +1117,7 @@ static int
 qemuDomainAttachDeviceMknodHelper(pid_t pid G_GNUC_UNUSED,
                                   void *opaque)
 {
-    struct qemuDomainAttachDeviceMknodData *data = opaque;
+    struct qemuDomainMknodData *data = opaque;
     int ret = -1;
     bool delDevice = false;
     bool isLink = S_ISLNK(data->sb.st_mode);
@@ -1262,7 +1262,7 @@ qemuDomainAttachDeviceMknodRecursive(virQEMUDriverPtr driver,
                                      unsigned int ttl)
 {
     g_autoptr(virQEMUDriverConfig) cfg = NULL;
-    struct qemuDomainAttachDeviceMknodData data;
+    struct qemuDomainMknodData data;
     int ret = -1;
     g_autofree char *target = NULL;
     bool isLink;
-- 
2.26.2

Re: [PATCH v1 09/34] qemu_domain_namespace.c: Rename qemuDomainAttachDeviceMknodData
Posted by Ján Tomko 5 years, 6 months ago
On a Wednesday in 2020, Michal Privoznik wrote:
>This structure is going to be used from not only device attach
>code, but also when building the namespace. Moreover, the code
>lives in a separate file so the chances of clashing with another
>name are minimal.
>
>Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
>---
> src/qemu/qemu_domain_namespace.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
>diff --git a/src/qemu/qemu_domain_namespace.c b/src/qemu/qemu_domain_namespace.c
>index e385cda64a..40c4fb36cb 100644
>--- a/src/qemu/qemu_domain_namespace.c
>+++ b/src/qemu/qemu_domain_namespace.c
>@@ -1098,7 +1098,7 @@ qemuDomainNamespaceAvailable(qemuDomainNamespace ns G_GNUC_UNUSED)
> }
>
>
>-struct qemuDomainAttachDeviceMknodData {
>+struct qemuDomainMknodData {

qemuNamespaceMkondData would be more fitting.

>     virQEMUDriverPtr driver;
>     virDomainObjPtr vm;
>     const char *file;

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano