]> git.proxmox.com Git - pve-qemu-kvm.git/blob - debian/patches/old/0009-vma-only-store-the-basename-of-a-configuration-file.patch
f6b3a6652f17722b8beb798d25abe9148070b72c
[pve-qemu-kvm.git] / debian / patches / old / 0009-vma-only-store-the-basename-of-a-configuration-file.patch
1 From 41811d473df9a1cb09bc4f44eba3147dcec231b1 Mon Sep 17 00:00:00 2001
2 From: Dietmar Maurer <dietmar@proxmox.com>
3 Date: Wed, 8 May 2013 10:01:29 +0200
4 Subject: [PATCH v5 9/9] vma: only store the basename of a configuration file
5
6 It makes no sense to store the whole filesystem path here.
7
8 Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
9 ---
10 vma-writer.c | 5 ++++-
11 vma.c | 2 +-
12 2 files changed, 5 insertions(+), 2 deletions(-)
13
14 diff --git a/vma-writer.c b/vma-writer.c
15 index 9228ca6..3cc9cf2 100644
16 --- a/vma-writer.c
17 +++ b/vma-writer.c
18 @@ -145,7 +145,10 @@ int vma_writer_add_config(VmaWriter *vmaw, const char *name, gpointer data,
19 assert(data);
20 assert(len);
21
22 - uint32_t name_ptr = allocate_header_string(vmaw, name);
23 + gchar *basename = g_path_get_basename(name);
24 + uint32_t name_ptr = allocate_header_string(vmaw, basename);
25 + g_free(basename);
26 +
27 if (!name_ptr) {
28 return -1;
29 }
30 diff --git a/vma.c b/vma.c
31 index bcde379..f4a8218 100644
32 --- a/vma.c
33 +++ b/vma.c
34 @@ -33,7 +33,7 @@ static void help(void)
35 "\n"
36 "vma list <filename>\n"
37 "vma create <filename> [-c config] <archive> pathname ...\n"
38 - "vma extract <filename> [-v] [-r] <targetdir>\n"
39 + "vma extract <filename> [-v] [-r <fifo>] <targetdir>\n"
40 "vma verify <filename> [-v]\n"
41 ;
42
43 --
44 1.7.10.4
45