mirror of
https://github.com/sheumann/NetDisk.git
synced 2024-12-22 10:30:42 +00:00
85cb0c5971
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;
|
|
}
|