mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-20 23:12:22 +08:00
2011-10-10 Ralf Corsépius <ralf.corsepius@rtems.org>
* libfs/src/devfs/devfs_mknod.c: Remove const cast. * libfs/src/imfs/ioman.c: Remove const cast. * libfs/src/devfs/devfs.h: Make device_name a const char*. * sapi/include/rtems/io.h: Make device_name a const char*.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2011-10-10 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* libfs/src/devfs/devfs_mknod.c: Remove const cast.
|
||||
* libfs/src/imfs/ioman.c: Remove const cast.
|
||||
* libfs/src/devfs/devfs.h: Make device_name a const char*.
|
||||
* sapi/include/rtems/io.h: Make device_name a const char*.
|
||||
|
||||
2011-10-10 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* libcsupport/src/termios.c: Remove meaningless typecast.
|
||||
|
||||
@@ -21,7 +21,7 @@ extern "C" {
|
||||
typedef struct
|
||||
{
|
||||
/** This member points to device name which is a null-terminated string */
|
||||
char *device_name;
|
||||
const char *device_name;
|
||||
/** This member is the name length of a device */
|
||||
uint32_t device_name_length;
|
||||
/** major number of a device */
|
||||
|
||||
@@ -69,7 +69,7 @@ int devFS_mknod(
|
||||
rtems_set_errno_and_return_minus_one( ENOMEM );
|
||||
|
||||
_ISR_Disable(level);
|
||||
device_name_table[slot].device_name = (char *)path;
|
||||
device_name_table[slot].device_name = path;
|
||||
device_name_table[slot].device_name_length = strlen(path);
|
||||
device_name_table[slot].major = major;
|
||||
device_name_table[slot].minor = minor;
|
||||
|
||||
@@ -82,7 +82,7 @@ rtems_status_code rtems_io_lookup_name(
|
||||
return RTEMS_UNSATISFIED;
|
||||
}
|
||||
|
||||
device_info->device_name = (char *) name;
|
||||
device_info->device_name = name;
|
||||
device_info->device_name_length = strlen( name );
|
||||
device_info->major = the_jnode->info.device.major;
|
||||
device_info->minor = the_jnode->info.device.minor;
|
||||
|
||||
@@ -174,7 +174,7 @@ rtems_status_code rtems_io_control(
|
||||
/** @} */
|
||||
|
||||
typedef struct {
|
||||
char *device_name;
|
||||
const char *device_name;
|
||||
size_t device_name_length;
|
||||
rtems_device_major_number major;
|
||||
rtems_device_minor_number minor;
|
||||
|
||||
Reference in New Issue
Block a user