Follow up after adding const by doing some more.
This commit is contained in:
parent
3bed0ba4dd
commit
c92bbdc733
|
@ -35,7 +35,7 @@
|
||||||
* otherwise) arising in any way out of the use of this software, even if
|
* otherwise) arising in any way out of the use of this software, even if
|
||||||
* advised of the possibility of such damage.
|
* advised of the possibility of such damage.
|
||||||
*
|
*
|
||||||
* $Id: vinumutil.c,v 1.2 2005/06/26 22:34:12 christos Exp $
|
* $Id: vinumutil.c,v 1.3 2005/07/05 22:20:47 he Exp $
|
||||||
* $FreeBSD$
|
* $FreeBSD$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ extern jmp_buf command_fail; /* return on a failed command */
|
||||||
static char numeric_state[32]; /* temporary buffer for ASCII conversions */
|
static char numeric_state[32]; /* temporary buffer for ASCII conversions */
|
||||||
#define STATECOUNT(x) (sizeof (x##statetext) / sizeof (char *))
|
#define STATECOUNT(x) (sizeof (x##statetext) / sizeof (char *))
|
||||||
/* Return drive state as a string */
|
/* Return drive state as a string */
|
||||||
char *
|
const char *
|
||||||
drive_state(enum drivestate state)
|
drive_state(enum drivestate state)
|
||||||
{
|
{
|
||||||
if (((unsigned) state) >= STATECOUNT(drive)) {
|
if (((unsigned) state) >= STATECOUNT(drive)) {
|
||||||
|
@ -63,7 +63,7 @@ drive_state(enum drivestate state)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return volume state as a string */
|
/* Return volume state as a string */
|
||||||
char *
|
const char *
|
||||||
volume_state(enum volumestate state)
|
volume_state(enum volumestate state)
|
||||||
{
|
{
|
||||||
if (((unsigned) state) >= STATECOUNT(vol)) {
|
if (((unsigned) state) >= STATECOUNT(vol)) {
|
||||||
|
@ -74,7 +74,7 @@ volume_state(enum volumestate state)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return plex state as a string */
|
/* Return plex state as a string */
|
||||||
char *
|
const char *
|
||||||
plex_state(enum plexstate state)
|
plex_state(enum plexstate state)
|
||||||
{
|
{
|
||||||
if (((unsigned) state) >= STATECOUNT(plex)) {
|
if (((unsigned) state) >= STATECOUNT(plex)) {
|
||||||
|
@ -115,7 +115,7 @@ plex_org(enum plexorg org)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return sd state as a string */
|
/* Return sd state as a string */
|
||||||
char *
|
const char *
|
||||||
sd_state(enum sdstate state)
|
sd_state(enum sdstate state)
|
||||||
{
|
{
|
||||||
if (((unsigned) state) >= STATECOUNT(sd)) {
|
if (((unsigned) state) >= STATECOUNT(sd)) {
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
* otherwise) arising in any way out of the use of this software, even if
|
* otherwise) arising in any way out of the use of this software, even if
|
||||||
* advised of the possibility of such damage.
|
* advised of the possibility of such damage.
|
||||||
*
|
*
|
||||||
* $Id: vinumutil.h,v 1.2 2005/06/26 22:34:38 christos Exp $
|
* $Id: vinumutil.h,v 1.3 2005/07/05 22:20:47 he Exp $
|
||||||
* $FreeBSD$
|
* $FreeBSD$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -43,11 +43,11 @@
|
||||||
* Functions defined in vinumutil.c, which is used both in userland
|
* Functions defined in vinumutil.c, which is used both in userland
|
||||||
* and in the kernel.
|
* and in the kernel.
|
||||||
*/
|
*/
|
||||||
char *drive_state(enum drivestate);
|
const char *drive_state(enum drivestate);
|
||||||
char *volume_state(enum volumestate);
|
const char *volume_state(enum volumestate);
|
||||||
char *plex_state(enum plexstate);
|
const char *plex_state(enum plexstate);
|
||||||
const char *plex_org(enum plexorg);
|
const char *plex_org(enum plexorg);
|
||||||
char *sd_state(enum sdstate);
|
const char *sd_state(enum sdstate);
|
||||||
enum drivestate DriveState(char *text);
|
enum drivestate DriveState(char *text);
|
||||||
enum sdstate SdState(char *text);
|
enum sdstate SdState(char *text);
|
||||||
enum plexstate PlexState(char *text);
|
enum plexstate PlexState(char *text);
|
||||||
|
|
Loading…
Reference in New Issue