mirror of
https://github.com/sheumann/NetDisk.git
synced 2025-02-20 01:29:05 +00:00
The CDev connects to the network if not already connected, and it displays the arrow cursor in the "no NetDiskInit" alert from MachineCDEV. The mounturl utility now has meaningful return values.
25 lines
622 B
C
25 lines
622 B
C
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <stdio.h>
|
|
#include <locator.h>
|
|
#include "mounturl.h"
|
|
|
|
int main(int argc, char **argv) {
|
|
if (argc < 2)
|
|
return -1;
|
|
|
|
struct MountURLRec mountURLRec = {sizeof(struct MountURLRec)};
|
|
mountURLRec.result = NETDISK_NOT_PRESENT;
|
|
mountURLRec.url = argv[1];
|
|
|
|
SendRequest(MountURL, sendToName|stopAfterOne, (Long)NETDISK_REQUEST_NAME,
|
|
(Long)&mountURLRec, NULL);
|
|
|
|
if (mountURLRec.result != OPERATION_SUCCESSFUL) {
|
|
fprintf(stderr, "MountURL error %u\n", mountURLRec.result);
|
|
return 1;
|
|
}
|
|
|
|
return 0;
|
|
}
|