mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
Revert "support colon in filenames"
This reverts commit 707c0dbc97.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
c6a5a71a3a
commit
1cec71e359
6 changed files with 11 additions and 48 deletions
26
cutils.c
26
cutils.c
|
|
@ -24,32 +24,6 @@
|
|||
#include "qemu-common.h"
|
||||
#include "host-utils.h"
|
||||
|
||||
/*
|
||||
* fill first 'len' characters of 'buff' with pruned
|
||||
* contents of 'str' delimited by the character 'c'.
|
||||
* Escape character '\' is pruned off.
|
||||
* Return pointer to the delimiting character.
|
||||
*/
|
||||
const char *fill_token(char *buf, const int len, const char *str, const char c)
|
||||
{
|
||||
const char *p=str;
|
||||
char *q=buf;
|
||||
|
||||
while (p < str+len-1) {
|
||||
if (*p == c)
|
||||
break;
|
||||
if (*p == '\\') {
|
||||
p++;
|
||||
if (*p == '\0')
|
||||
break;
|
||||
}
|
||||
*q++ = *p++;
|
||||
}
|
||||
*q='\0';
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
void pstrcpy(char *buf, int buf_size, const char *str)
|
||||
{
|
||||
int c;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue