From: Dunrong Huang <riegamaths@gmail.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: ark McLoughlin <markmc@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] slirp: Ensure smbd and shared directory exist when enable smb
Date: Fri, 6 Jul 2012 13:55:22 +0800 [thread overview]
Message-ID: <CAOZVR5YsVLsqU5RK_EyLtwG6m0nhHsddHCDZQNKiDLGMs=2bzA@mail.gmail.com> (raw)
In-Reply-To: <4FF620AA.2050706@web.de>
Thanks for your reply.
2012/7/6 Jan Kiszka <jan.kiszka@web.de>:
>> 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
prev parent reply other threads:[~2012-07-06 5:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-03 13:13 [Qemu-devel] [PATCH] slirp: Ensure smbd and shared directory exist when enable smb Dunrong Huang
2012-07-05 23:18 ` Jan Kiszka
2012-07-06 5:55 ` Dunrong Huang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOZVR5YsVLsqU5RK_EyLtwG6m0nhHsddHCDZQNKiDLGMs=2bzA@mail.gmail.com' \
--to=riegamaths@gmail.com \
--cc=aliguori@us.ibm.com \
--cc=jan.kiszka@web.de \
--cc=markmc@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).