forked from Imagelibrary/rtems
Removed asserts that shouldn't be called and commented case where this
indicates an internal error.
This commit is contained in:
@@ -22,7 +22,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include "libio_.h"
|
#include "libio_.h"
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ IMFS_jnode_t *IMFS_find_match_in_dir(
|
|||||||
IMFS_jnode_t *the_jnode;
|
IMFS_jnode_t *the_jnode;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for fatal errors
|
* Check for fatal errors. A NULL directory show a problem in the
|
||||||
|
* the IMFS code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
assert( directory );
|
assert( directory );
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include "imfs.h"
|
#include "imfs.h"
|
||||||
#include "libio_.h"
|
#include "libio_.h"
|
||||||
@@ -52,7 +51,6 @@ int IMFS_mknod(
|
|||||||
type = IMFS_DEVICE;
|
type = IMFS_DEVICE;
|
||||||
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
|
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
|
||||||
} else {
|
} else {
|
||||||
assert( 0 );
|
|
||||||
set_errno_and_return_minus_one( EINVAL );
|
set_errno_and_return_minus_one( EINVAL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ IMFS_jnode_t *IMFS_find_match_in_dir(
|
|||||||
IMFS_jnode_t *the_jnode;
|
IMFS_jnode_t *the_jnode;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for fatal errors
|
* Check for fatal errors. A NULL directory show a problem in the
|
||||||
|
* the IMFS code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
assert( directory );
|
assert( directory );
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include "imfs.h"
|
#include "imfs.h"
|
||||||
#include "libio_.h"
|
#include "libio_.h"
|
||||||
@@ -52,7 +51,6 @@ int IMFS_mknod(
|
|||||||
type = IMFS_DEVICE;
|
type = IMFS_DEVICE;
|
||||||
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
|
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
|
||||||
} else {
|
} else {
|
||||||
assert( 0 );
|
|
||||||
set_errno_and_return_minus_one( EINVAL );
|
set_errno_and_return_minus_one( EINVAL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include "libio_.h"
|
#include "libio_.h"
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ IMFS_jnode_t *IMFS_find_match_in_dir(
|
|||||||
IMFS_jnode_t *the_jnode;
|
IMFS_jnode_t *the_jnode;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for fatal errors
|
* Check for fatal errors. A NULL directory show a problem in the
|
||||||
|
* the IMFS code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
assert( directory );
|
assert( directory );
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include "imfs.h"
|
#include "imfs.h"
|
||||||
#include "libio_.h"
|
#include "libio_.h"
|
||||||
@@ -52,7 +51,6 @@ int IMFS_mknod(
|
|||||||
type = IMFS_DEVICE;
|
type = IMFS_DEVICE;
|
||||||
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
|
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
|
||||||
} else {
|
} else {
|
||||||
assert( 0 );
|
|
||||||
set_errno_and_return_minus_one( EINVAL );
|
set_errno_and_return_minus_one( EINVAL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include "libio_.h"
|
#include "libio_.h"
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ IMFS_jnode_t *IMFS_find_match_in_dir(
|
|||||||
IMFS_jnode_t *the_jnode;
|
IMFS_jnode_t *the_jnode;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for fatal errors
|
* Check for fatal errors. A NULL directory show a problem in the
|
||||||
|
* the IMFS code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
assert( directory );
|
assert( directory );
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include "imfs.h"
|
#include "imfs.h"
|
||||||
#include "libio_.h"
|
#include "libio_.h"
|
||||||
@@ -52,7 +51,6 @@ int IMFS_mknod(
|
|||||||
type = IMFS_DEVICE;
|
type = IMFS_DEVICE;
|
||||||
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
|
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
|
||||||
} else {
|
} else {
|
||||||
assert( 0 );
|
|
||||||
set_errno_and_return_minus_one( EINVAL );
|
set_errno_and_return_minus_one( EINVAL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user