Go to the source code of this file.
◆ FILE_LICENCE()
| FILE_LICENCE |
( |
GPL2_OR_LATER_OR_UBDL | | ) |
|
◆ FILE_SECBOOT()
| FILE_SECBOOT |
( |
PERMITTED | | ) |
|
◆ basename()
| char * basename |
( |
char * | path | ) |
|
|
extern |
Return base name from path.
- Parameters
-
- Return values
-
Definition at line 43 of file basename.c.
43 {
45
48}
char * basename(char *path)
Return base name from path.
char * strrchr(const char *src, int character)
Find rightmost character within a string.
References basename(), and strrchr().
Referenced by basename(), image_set_uri(), and nfs_uri_init().
◆ dirname()
| char * dirname |
( |
char * | path | ) |
|
|
extern |
Return directory name from path.
- Parameters
-
- Return values
-
Note that this function may modify its argument.
Definition at line 58 of file basename.c.
58 {
59 char *separator;
60
61 separator =
strrchr ( path,
'/' );
62 if ( separator == path ) {
63 return "/";
64 } else if ( separator ) {
65 *separator = 0;
66 return path;
67 } else {
68 return ".";
69 }
70}
References strrchr().
Referenced by nfs_uri_init(), and resolve_path().