usrdsc.dsc$a_pointer = usrname;
if (!((sts = sys$getuai(0, 0, &usrdsc, uailst, 0, 0, 0)) & 1)) {
switch (sts) {
- case SS$_NOGRPPRV:
- case SS$_NOSYSPRV:
+ case SS$_NOGRPPRV: case SS$_NOSYSPRV:
set_errno(EACCES);
break;
case RMS$_RNF:
newace.myace$l_ident = oldace.myace$l_ident;
if (!((aclsts = sys$change_acl(0,&type,&fildsc,lcklst,0,0,0)) & 1)) {
switch (aclsts) {
- case RMS$_FNF:
- case RMS$_DNF:
- case RMS$_DIR:
- case SS$_NOSUCHOBJECT:
+ case RMS$_FNF: case RMS$_DNF: case SS$_NOSUCHOBJECT:
set_errno(ENOENT); break;
+ case RMS$_DIR:
+ set_errno(ENOTDIR); break;
case RMS$_DEV:
set_errno(ENODEV); break;
- case RMS$_SYN:
- case SS$_INVFILFOROP:
+ case RMS$_SYN: case SS$_INVFILFOROP:
set_errno(EINVAL); break;
case RMS$_PRV:
set_errno(EACCES); break;
retsts = sys$parse(&myfab,0,0);
if (!(retsts & 1)) {
mynam.nam$b_nop |= NAM$M_SYNCHK;
- if (retsts == RMS$_DNF || retsts == RMS$_DIR ||
- retsts == RMS$_DEV || retsts == RMS$_DEV) {
+ if (retsts == RMS$_DNF || retsts == RMS$_DIR || retsts == RMS$_DEV) {
retsts = sys$parse(&myfab,0,0);
if (retsts & 1) goto expanded;
}
set_vaxc_errno(sts);
switch (sts)
{
- case RMS$_FNF:
- case RMS$_DNF:
- case RMS$_DIR:
+ case RMS$_FNF: case RMS$_DNF:
set_errno(ENOENT); break;
+ case RMS$_DIR:
+ set_errno(ENOTDIR); break;
case RMS$_DEV:
set_errno(ENODEV); break;
- case RMS$_FNM:
- case RMS$_SYN:
+ case RMS$_FNM: case RMS$_SYN:
set_errno(EINVAL); break;
case RMS$_PRV:
set_errno(EACCES); break;
case RMS$_DEV:
set_errno(ENODEV); break;
case RMS$_DIR:
- case RMS$_FNF:
+ set_errno(ENOTDIR); break;
+ case RMS$_FNF: case RMS$_DNF:
set_errno(ENOENT); break;
default:
set_errno(EVMSERR);
retsts = lib$do_command(&VMScmd);
switch (retsts) {
- case RMS$_FNF:
+ case RMS$_FNF: case RMS$_DNF:
set_errno(ENOENT); break;
- case RMS$_DNF: case RMS$_DIR: case RMS$_DEV:
+ case RMS$_DIR:
set_errno(ENOTDIR); break;
+ case RMS$_DEV:
+ set_errno(ENODEV); break;
case RMS$_PRV:
set_errno(EACCES); break;
case RMS$_SYN:
if (!(sts & 1)) {
switch (sts) {
- case RMS$_FNF:
+ case RMS$_FNF: case RMS$_DNF:
set_errno(ENOENT); break;
- case RMS$_DNF: case RMS$_DIR: case RMS$_DEV:
+ case RMS$_DIR:
set_errno(ENOTDIR); break;
+ case RMS$_DEV:
+ set_errno(ENODEV); break;
case RMS$_PRV:
set_errno(EACCES); break;
case RMS$_SYN:
}
switch (bit) {
- case S_IXUSR:
- case S_IXGRP:
- case S_IXOTH:
- access = ARM$M_EXECUTE;
- break;
- case S_IRUSR:
- case S_IRGRP:
- case S_IROTH:
- access = ARM$M_READ;
- break;
- case S_IWUSR:
- case S_IWGRP:
- case S_IWOTH:
- access = ARM$M_WRITE;
- break;
- case S_IDUSR:
- case S_IDGRP:
- case S_IDOTH:
- access = ARM$M_DELETE;
- break;
+ case S_IXUSR: case S_IXGRP: case S_IXOTH:
+ access = ARM$M_EXECUTE; break;
+ case S_IRUSR: case S_IRGRP: case S_IROTH:
+ access = ARM$M_READ; break;
+ case S_IWUSR: case S_IWGRP: case S_IWOTH:
+ access = ARM$M_WRITE; break;
+ case S_IDUSR: case S_IDGRP: case S_IDOTH:
+ access = ARM$M_DELETE; break;
default:
return FALSE;
}
if (!((sts = sys$open(&fab_in)) & 1)) {
set_vaxc_errno(sts);
switch (sts) {
- case RMS$_FNF:
- case RMS$_DIR:
+ case RMS$_FNF: case RMS$_DNF:
set_errno(ENOENT); break;
+ case RMS$_DIR:
+ set_errno(ENOTDIR); break;
case RMS$_DEV:
set_errno(ENODEV); break;
case RMS$_SYN:
if (!((sts = sys$create(&fab_out)) & 1)) {
set_vaxc_errno(sts);
switch (sts) {
- case RMS$_DIR:
+ case RMS$_DNF:
set_errno(ENOENT); break;
+ case RMS$_DIR:
+ set_errno(ENOTDIR); break;
case RMS$_DEV:
set_errno(ENODEV); break;
case RMS$_SYN: