2018-08-10 22:53:09 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2018-08-12 23:45:08 +00:00
|
|
|
#include <stdio.h>
|
2018-08-10 22:53:09 +00:00
|
|
|
#include <gsos.h>
|
2018-08-12 23:45:08 +00:00
|
|
|
#include "mounturl.h"
|
2018-08-10 22:53:09 +00:00
|
|
|
|
|
|
|
int main(int argc, char **argv) {
|
2018-08-12 23:45:08 +00:00
|
|
|
struct MountURLRec mountURLRec;
|
2018-08-10 22:53:09 +00:00
|
|
|
DAccessRecGS controlRec = {5};
|
|
|
|
|
|
|
|
if (argc < 3)
|
|
|
|
return;
|
|
|
|
|
2018-08-12 23:45:08 +00:00
|
|
|
mountURLRec.byteCount = sizeof(mountURLRec);
|
|
|
|
mountURLRec.url = argv[2];
|
|
|
|
|
2018-08-10 22:53:09 +00:00
|
|
|
controlRec.devNum = strtoul(argv[1], NULL, 0);
|
|
|
|
controlRec.code = MountURL;
|
2018-08-12 23:45:08 +00:00
|
|
|
controlRec.list = (Pointer)&mountURLRec;
|
|
|
|
controlRec.requestCount = sizeof(mountURLRec);
|
2018-08-10 22:53:09 +00:00
|
|
|
|
|
|
|
DControl(&controlRec);
|
2018-08-12 23:45:08 +00:00
|
|
|
|
|
|
|
if (mountURLRec.result != OPERATION_SUCCESSFUL) {
|
|
|
|
fprintf(stderr, "MountURL error %u\n", mountURLRec.result);
|
|
|
|
}
|
2018-08-10 22:53:09 +00:00
|
|
|
}
|