Skip to contentSkip to conversation

support colon in filenames

Qemu-devel Jan Kiszka 2 participants 4 messages Jul 4, 2009 – Jul 7, 2009 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Jan Kiszka

author
#1 lore raw

Anthony,

please revert this patch until Ram Pai provides a better version. It causes too many problems. At least it

- breaks -pflash somefile -snapshot
- breaks mingw32 build due to redefined _open
- uses PATH_MAX

rev3 does not fix any of the above.

At this chance: there is at least one indention issue remaining in fill_token() which would be nice to fix while reworking the patch.

Jan

author
#2 lore raw
Quoted 6 lines · Jan Kiszka

Anthony,

please revert this patch until Ram Pai provides a better version. It causes too many problems. At least it

- breaks -pflash somefile -snapshot

Some more details on this: it's not just pflash that suffers, -snapshot was broken for raw images in general. Declaring file access as a protocol apparently has some unwanted side effects that first have to be resolved (check also bdrv_open2 /wrt realpath).

Quoted 1 line

- breaks mingw32 build due to redefined _open

Sorry, this obviously does not apply to the merged revision 2 but to rev3 which I had applied locally.

Quoted 9 lines

- uses PATH_MAX

rev3 does not fix any of the above.

At this chance: there is at least one indention issue remaining in fill_token() which would be nice to fix while reworking the patch.

Jan

Jan

#3 lore raw
Quoted 5 lines · Jan Kiszka
Quoted 4 lines · Jan Kiszka

Anthony,

please revert this patch until Ram Pai provides a better version. It causes too many problems. At least it

Jan,

Yes I am working on the next revision of the patch.

Quoted 7 lines
Quoted 2 lines

- breaks -pflash somefile -snapshot

Some more details on this: it's not just pflash that suffers, -snapshot was broken for raw images in general. Declaring file access as a protocol apparently has some unwanted side effects that first have to be resolved (check also bdrv_open2 /wrt realpath).

I do not entirely understand the side effect. I will see if I can figure this out. It will certainly help if you can elaborate more?

Quoted 7 lines
Quoted 2 lines

- breaks mingw32 build due to redefined _open

Sorry, this obviously does not apply to the merged revision 2 but to rev3 which I had applied locally.

Quoted 1 line

- uses PATH_MAX

PATH_MAX is not defined in mingw32 environment?

Quoted 6 lines
Quoted 6 lines

rev3 does not fix any of the above.

At this chance: there is at least one indention issue remaining in fill_token() which would be nice to fix while reworking the patch.

yes. noted.

Thanks,
RP

Quoted 5 lines
Quoted 2 lines

Jan

Jan

author
#4 lore raw
Quoted 9 lines · Ram Pai
Quoted 5 lines · Jan Kiszka
Quoted 4 lines · Jan Kiszka

Anthony,

please revert this patch until Ram Pai provides a better version. It causes too many problems. At least it

Jan,

Yes I am working on the next revision of the patch.

I'm ok with keeping the change if you commit yourself to fix the regressions quickly.

Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

- breaks -pflash somefile -snapshot

Some more details on this: it's not just pflash that suffers, -snapshot was broken for raw images in general. Declaring file access as a protocol apparently has some unwanted side effects that first have to be resolved (check also bdrv_open2 /wrt realpath).

I do not entirely understand the side effect. I will see if I can figure this out. It will certainly help if you can elaborate more?

Start with running/debugging 'qemu raw.image -snapshot'. Also study the codepath bdrv_open2 takes when snapshot is enabled. Specifically watch out for realpath(). I'm not sure ATM why it is needed, but it used to be applied on all file paths.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

- breaks mingw32 build due to redefined _open

Sorry, this obviously does not apply to the merged revision 2 but to rev3 which I had applied locally.

Quoted 1 line

- uses PATH_MAX

PATH_MAX is not defined in mingw32 environment?

It may not be defined in all environments (I've recently stumbled over this with a patch, too), and it's possible that PATH_MAX < strlen(path). Given that you can measure the input path length and the fact that the output path cannot be larger, allocating this buffer from the heap is really straightforward.

Jan