version 1.5.20.9, 2018/01/02 02:02:16
|
version 1.5.20.10, 2021/03/21 01:30:19
|
Line 12 terms:
|
Line 12 terms:
|
All of the documentation and software included in the ELWIX and AITNET |
All of the documentation and software included in the ELWIX and AITNET |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
|
|
Copyright 2004 - 2018 | Copyright 2004 - 2021 |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
|
|
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
Line 90 getmntpt(const char *name)
|
Line 90 getmntpt(const char *name)
|
static int |
static int |
update(int flags) |
update(int flags) |
{ |
{ |
struct ufs_args mnt; |
|
struct statfs *mntfs = getmntpt(AIT_GET_STR(&Mount)); |
struct statfs *mntfs = getmntpt(AIT_GET_STR(&Mount)); |
|
char errmsg[STRSIZ] = { [0 ... STRSIZ - 1] = 0 }; |
|
|
|
#ifdef __NetBSD__ |
|
struct ufs_args mnt; |
|
|
memset(&mnt, 0, sizeof mnt); |
memset(&mnt, 0, sizeof mnt); |
mnt.fspec = mntfs->f_mntfromname; |
mnt.fspec = mntfs->f_mntfromname; |
#ifdef __NetBSD__ |
|
if (mount(mntfs->f_fstypename, mntfs->f_mntonname, flags, &mnt, sizeof mnt) == -1) { |
if (mount(mntfs->f_fstypename, mntfs->f_mntonname, flags, &mnt, sizeof mnt) == -1) { |
#else |
#else |
if (mount(mntfs->f_fstypename, mntfs->f_mntonname, flags, &mnt) == -1) { | iovec_t *iov; |
| int ret; |
| |
| iov = iov_Init(); |
| if (!iov) |
| return -1; |
| if (flags & MNT_RDONLY) |
| iov_PushPair(iov, "ro", "", 0); |
| else |
| iov_PushPair(iov, "noro", "", 0); |
| iov_PushPair(iov, "update", "", 0); |
| iov_PushPair(iov, "fstype", mntfs->f_fstypename, (size_t) -1); |
| iov_PushPair(iov, "fspath", mntfs->f_mntonname, (size_t) -1); |
| iov_PushPair(iov, "from", mntfs->f_mntfromname, (size_t) -1); |
| iov_PushPair(iov, "errmsg", errmsg, sizeof errmsg); |
| |
| ret = nmount(iov_Array(iov), iov_Size(iov), flags); |
| |
| iov_FreePairs(iov, 0); |
| iov_Destroy(&iov); |
| if (ret == -1) { |
#endif |
#endif |
printf("Error:: can`t update mount %s #%d - %s\n", AIT_GET_STR(&Mount), | printf("Error:: can`t update mount %s %s #%d - %s\n", AIT_GET_STR(&Mount), |
errno, strerror(errno)); | errmsg, errno, strerror(errno)); |
return -1; |
return -1; |
} |
} |
|
|