[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] slirp: Ensure smbd and shared directory exist w
From: |
Dunrong Huang |
Subject: |
Re: [Qemu-devel] [PATCH] slirp: Ensure smbd and shared directory exist when enable smb |
Date: |
Fri, 6 Jul 2012 13:55:22 +0800 |
Thanks for your reply.
2012/7/6 Jan Kiszka <address@hidden>:
>> diff --git a/net/slirp.c b/net/slirp.c
>> index 37b6ccf..a672cff 100644
>> --- a/net/slirp.c
>> +++ b/net/slirp.c
>> @@ -489,6 +489,20 @@ static int slirp_smb(SlirpState* s, const char
>> *exported_dir,
>> char smb_cmdline[128];
>> FILE *f;
>>
>> + if (access(CONFIG_SMBD_COMMAND, F_OK)) {
>> + slirp_smb_cleanup(s);
>
> Both slirp_smb_cleanup are redundant at this point, please remove them.
You are right, i will fix it
>
>> + error_report("could not find '%s', please install it",
>> + CONFIG_SMBD_COMMAND);
>> + return -1;
>> + }
>> +
>> + if (access(exported_dir, F_OK)) {
>
> What about checking for R_OK | X_OK to avoid that we run into lacking
> permissions later on?
>
I agree with you, I will send a v2 patch
--
Best Regards,
Dunrong Huang