sandbox: Update os_open() to return an error code
It is convenient to be able to report the system error when available. Update os_open() to return it. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -171,7 +171,7 @@ static int sandbox_sf_probe(struct udevice *dev)
|
||||
memset(sandbox_sf_0xff, 0xff, sizeof(sandbox_sf_0xff));
|
||||
|
||||
sbsf->fd = os_open(pdata->filename, 02);
|
||||
if (sbsf->fd == -1) {
|
||||
if (sbsf->fd < 0) {
|
||||
printf("%s: unable to open file '%s'\n", __func__,
|
||||
pdata->filename);
|
||||
ret = -EIO;
|
||||
|
||||
Reference in New Issue
Block a user