NetDisk/mounturl.c
Stephen Heumann 85cb0c5971 CDev and mounturl tweaks.
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.
2018-08-14 20:44:08 -05:00

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;
}