diff mbox

[U-Boot,1/6] sandbox: only do sandboxfs for hostfs interface

Message ID 1424385674-19920-2-git-send-email-sjoerd.simons@collabora.co.uk
State Superseded
Delegated to: Simon Glass
Headers show

Commit Message

Sjoerd Simons Feb. 19, 2015, 10:41 p.m. UTC
Only do sandbox filesystem access when using the hostfs device
interface, rather then falling back to it in all cases. This prevents
confusion situations due to the fallback being taken rather then an
unsupported error being raised.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
---
 fs/sandbox/sandboxfs.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Simon Glass Feb. 20, 2015, 7:22 p.m. UTC | #1
Hi Sjoerd,

On 19 February 2015 at 15:41, Sjoerd Simons
<sjoerd.simons@collabora.co.uk> wrote:
> Only do sandbox filesystem access when using the hostfs device
> interface, rather then falling back to it in all cases. This prevents
> confusion situations due to the fallback being taken rather then an
> unsupported error being raised.
>
> Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>

Reviewed-by: Simon Glass <sjg@chromium.org>

See nit below.

> ---
>  fs/sandbox/sandboxfs.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/sandbox/sandboxfs.c b/fs/sandbox/sandboxfs.c
> index a920bc0..c6540c6 100644
> --- a/fs/sandbox/sandboxfs.c
> +++ b/fs/sandbox/sandboxfs.c
> @@ -10,7 +10,10 @@
>
>  int sandbox_fs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info)
>  {
> -       return 0;
> +       /* Only accept a NULL block_dev_desc_t for the sandbox, which is when

/*
 * Only accept

> +        * hostfs interface is used
> +        */
> +       return rbdd != NULL;
>  }
>
>  int sandbox_fs_read_at(const char *filename, loff_t pos, void *buffer,
> --
> 2.1.4
>

Regards,
Simon
Simon Glass April 1, 2015, 1:59 a.m. UTC | #2
Hi Sjoerd,

On 20 February 2015 at 12:22, Simon Glass <sjg@chromium.org> wrote:
> Hi Sjoerd,
>
> On 19 February 2015 at 15:41, Sjoerd Simons
> <sjoerd.simons@collabora.co.uk> wrote:
>> Only do sandbox filesystem access when using the hostfs device
>> interface, rather then falling back to it in all cases. This prevents
>> confusion situations due to the fallback being taken rather then an
>> unsupported error being raised.
>>
>> Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
>
> See nit below.
>
>> ---
>>  fs/sandbox/sandboxfs.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/fs/sandbox/sandboxfs.c b/fs/sandbox/sandboxfs.c
>> index a920bc0..c6540c6 100644
>> --- a/fs/sandbox/sandboxfs.c
>> +++ b/fs/sandbox/sandboxfs.c
>> @@ -10,7 +10,10 @@
>>
>>  int sandbox_fs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info)
>>  {
>> -       return 0;
>> +       /* Only accept a NULL block_dev_desc_t for the sandbox, which is when
>
> /*
>  * Only accept
>
>> +        * hostfs interface is used
>> +        */
>> +       return rbdd != NULL;
>>  }
>>
>>  int sandbox_fs_read_at(const char *filename, loff_t pos, void *buffer,
>> --
>> 2.1.4

Can you please respin this series? I would like to apply it to a -next tree.

Regards,
Simon
diff mbox

Patch

diff --git a/fs/sandbox/sandboxfs.c b/fs/sandbox/sandboxfs.c
index a920bc0..c6540c6 100644
--- a/fs/sandbox/sandboxfs.c
+++ b/fs/sandbox/sandboxfs.c
@@ -10,7 +10,10 @@ 
 
 int sandbox_fs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info)
 {
-	return 0;
+	/* Only accept a NULL block_dev_desc_t for the sandbox, which is when
+	 * hostfs interface is used
+	 */
+	return rbdd != NULL;
 }
 
 int sandbox_fs_read_at(const char *filename, loff_t pos, void *buffer,