aboutsummaryrefslogtreecommitdiffstats
path: root/plpnfsd
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2001-02-06 01:01:46 +0000
committerFritz Elfert <felfert@to.com>2001-02-06 01:01:46 +0000
commita9fe8f28a4a9aaf1d9b84dbc6907849ace87f66e (patch)
tree0dd290cdf04cfd17a4ab4d0eb86bcb48137a02cb /plpnfsd
parenta8787d39b2bf1851cdea64a5e0eccc2aff7f15de (diff)
downloadplptools-a9fe8f28a4a9aaf1d9b84dbc6907849ace87f66e.tar.gz
plptools-a9fe8f28a4a9aaf1d9b84dbc6907849ace87f66e.tar.bz2
plptools-a9fe8f28a4a9aaf1d9b84dbc6907849ace87f66e.zip
- Added KDE2 PropsDialog Plugin (incomplete)
- Fixed some KDE related autoconf stuff - Added PlpDrive class for returning results from rfsv:devinfo - Added auto-watch in ppsocket and finally got rid of the nasty SIGPIPE bug. Now it's no more necessary to ignore SIGPIPE in applications. - Made constructors of rfsv16, rfsv32, rpcs16 and rpcs32 private to enforce use of the factories. - Removed error output in the factories and replaced that by error codes which can be retrieved and evaluated by an application.
Diffstat (limited to 'plpnfsd')
-rw-r--r--plpnfsd/main.cc20
-rw-r--r--plpnfsd/mp_mount.c1
2 files changed, 9 insertions, 12 deletions
diff --git a/plpnfsd/main.cc b/plpnfsd/main.cc
index 81e7176..e7e3640 100644
--- a/plpnfsd/main.cc
+++ b/plpnfsd/main.cc
@@ -405,13 +405,12 @@ long rfsv_getattr(const char *name, long *attr, long *size, long *time) {
}
long rfsv_statdev(char letter) {
- u_int32_t vfree, vtotal, vattr, vuniqueid;
+ PlpDrive drive;
u_int32_t devnum = letter - 'A';
- string n;
if (!a)
return -1;
- return (a->devinfo(devnum, vfree, vtotal, vattr, vuniqueid, n) != rfsv::E_PSI_GEN_NONE);
+ return (a->devinfo(devnum, drive) != rfsv::E_PSI_GEN_NONE);
}
long rfsv_rename(const char *oldname, const char *newname) {
@@ -431,19 +430,19 @@ long rfsv_drivelist(int *cnt, device **dlist) {
ret = a->devlist(devbits);
if (ret == 0)
for (i = 0; i<26; i++) {
- string name;
- u_int32_t vtotal, vfree, vattr, vuniqueid;
+ PlpDrive drive;
if ((devbits & 1) &&
- ((a->devinfo(i, vfree, vtotal, vattr, vuniqueid, name) == rfsv::E_PSI_GEN_NONE))) {
+ ((a->devinfo(i, drive) == rfsv::E_PSI_GEN_NONE))) {
+
device *next = *dlist;
*dlist = (device *)malloc(sizeof(device));
(*dlist)->next = next;
- (*dlist)->name = strdup(name.c_str());
- (*dlist)->total = vtotal;
- (*dlist)->free = vfree;
+ (*dlist)->name = strdup(drive.getName().c_str());
+ (*dlist)->total = drive.getSize();
+ (*dlist)->free = drive.getSpace();
(*dlist)->letter = 'A' + i;
- (*dlist)->attrib = vattr;
+ (*dlist)->attrib = drive.getMediaType();
(*cnt)++;
}
devbits >>= 1;
@@ -489,7 +488,6 @@ int main(int argc, char**argv) {
usage();
}
- signal(SIGPIPE, SIG_IGN);
skt = new ppsocket();
if (!skt->connect(NULL, sockNum)) {
cerr << "plpnfsd: could not connect to ncpd" << endl;
diff --git a/plpnfsd/mp_mount.c b/plpnfsd/mp_mount.c
index 6f9d203..39c3493 100644
--- a/plpnfsd/mp_mount.c
+++ b/plpnfsd/mp_mount.c
@@ -576,7 +576,6 @@ mount_and_run(char *dir, void (*proc)(), nfs_fh *root_fh)
signal(SIGUSR1, usr1_handler);
signal(SIGHUP, hup_handler);
signal(SIGTERM, term_handler);
- signal(SIGPIPE, SIG_IGN);
for (;;) {
fd_set readfd;