mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-23 13:26:37 +08:00
Make the license message viewable with a verbose option.
The license details can be viewed if you mount with a -v option: # mount -i nfs -o "-v" 1.2.3.4:/mnt /mnt
This commit is contained in:
parent
34f6271425
commit
761ae78e05
@ -132,7 +132,7 @@ rpcSetXIDs(uint32_t xid);
|
|||||||
* @retval 0 on success, -1 on failure
|
* @retval 0 on success, -1 on failure
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
rpcUdpInit(void);
|
rpcUdpInit(bool verbose);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief RPC cleanup and stop.
|
* @brief RPC cleanup and stop.
|
||||||
@ -167,7 +167,7 @@ rpcUdpCleanup(void);
|
|||||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
nfsInit(int smallPoolDepth, int bigPoolDepth);
|
nfsInit(int smallPoolDepth, int bigPoolDepth, bool verbose);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Driver cleanup code.
|
* @brief Driver cleanup code.
|
||||||
|
@ -1007,7 +1007,7 @@ NfsNode rval = nfsNodeCreate(node->nfs, 0);
|
|||||||
* on the fly).
|
* on the fly).
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
nfsInit(int smallPoolDepth, int bigPoolDepth)
|
nfsInit(int smallPoolDepth, int bigPoolDepth, bool verbose)
|
||||||
{
|
{
|
||||||
static int initialised = 0;
|
static int initialised = 0;
|
||||||
entry dummy;
|
entry dummy;
|
||||||
@ -1018,10 +1018,11 @@ rtems_status_code status;
|
|||||||
|
|
||||||
initialised = 1;
|
initialised = 1;
|
||||||
|
|
||||||
fprintf(stderr,
|
if (verbose)
|
||||||
"RTEMS-NFS $Release$, " \
|
fprintf(stderr,
|
||||||
"Till Straumann, Stanford/SLAC/SSRL 2002, " \
|
"RTEMS-NFS, " \
|
||||||
"See LICENSE file for licensing info.\n");
|
"Till Straumann, Stanford/SLAC/SSRL 2002, " \
|
||||||
|
"See LICENSE for licensing info.\n");
|
||||||
|
|
||||||
/* Get a major number */
|
/* Get a major number */
|
||||||
|
|
||||||
@ -1807,13 +1808,15 @@ NfsNode rootNode = 0;
|
|||||||
RpcUdpServer nfsServer = 0;
|
RpcUdpServer nfsServer = 0;
|
||||||
int e = -1;
|
int e = -1;
|
||||||
char *path = mt_entry->dev;
|
char *path = mt_entry->dev;
|
||||||
|
const char *options = (const char*) data;
|
||||||
|
bool verbose = strstr(options, "-v") != NULL;
|
||||||
|
|
||||||
if (rpcUdpInit () < 0) {
|
if (rpcUdpInit (verbose) < 0) {
|
||||||
fprintf (stderr, "error: initialising RPC\n");
|
fprintf (stderr, "error: initialising RPC\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nfsInit(0, 0) != 0) {
|
if (nfsInit(0, 0, verbose) != 0) {
|
||||||
fprintf (stderr, "error: initialising NFS\n");
|
fprintf (stderr, "error: initialising NFS\n");
|
||||||
return -1;
|
return -1;
|
||||||
};
|
};
|
||||||
|
@ -954,7 +954,7 @@ rpcSetXIDs(uint32_t xid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
rpcUdpInit(void)
|
rpcUdpInit(bool verbose)
|
||||||
{
|
{
|
||||||
int s;
|
int s;
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
@ -962,9 +962,11 @@ int noblock = 1;
|
|||||||
struct kevent change;
|
struct kevent change;
|
||||||
|
|
||||||
if (ourSock < 0) {
|
if (ourSock < 0) {
|
||||||
fprintf(stderr,"RTEMS-RPCIOD $Release$, " \
|
|
||||||
"Till Straumann, Stanford/SLAC/SSRL 2002, " \
|
if (verbose)
|
||||||
"See LICENSE file for licensing info.\n");
|
fprintf(stderr,"RTEMS-RPCIOD, " \
|
||||||
|
"Till Straumann, Stanford/SLAC/SSRL 2002, " \
|
||||||
|
"See LICENSE for licensing info.\n");
|
||||||
|
|
||||||
ourSock=socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
ourSock=socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||||
if (ourSock>=0) {
|
if (ourSock>=0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user