94df3e688c
+ add support for gcc4
149 lines
5.3 KiB
Text
149 lines
5.3 KiB
Text
$NetBSD: patch-at,v 1.1 2006/10/21 11:53:13 agc Exp $
|
|
|
|
--- ./sfsmisc/sfsclient.C.orig 2002-10-24 22:09:40.000000000 +0100
|
|
+++ ./sfsmisc/sfsclient.C
|
|
@@ -342,7 +342,7 @@ sfsserver::getnfscall (nfscall *nc)
|
|
return;
|
|
}
|
|
if (nc->proc () != NFSPROC3_GETATTR
|
|
- || nc->template getarg<nfs_fh3> ()->data != rootfh.data) {
|
|
+ || nc->getarg<nfs_fh3> ()->data != rootfh.data) {
|
|
touch ();
|
|
if (!authok (nc))
|
|
return;
|
|
@@ -383,13 +383,13 @@ sfsprog::cddispatch (svccb *sbp)
|
|
sbp->reply (NULL);
|
|
break;
|
|
case SFSCDPROC_INIT:
|
|
- sfs_suidserv (sbp->template getarg<sfscd_initarg> ()->name,
|
|
+ sfs_suidserv (sbp->getarg<sfscd_initarg> ()->name,
|
|
wrap (this, &sfsprog::ctlaccept));
|
|
sbp->reply (NULL);
|
|
break;
|
|
case SFSCDPROC_MOUNT:
|
|
{
|
|
- sfscd_mountarg *arg = sbp->template getarg<sfscd_mountarg> ();
|
|
+ sfscd_mountarg *arg = sbp->getarg<sfscd_mountarg> ();
|
|
ref<nfsserv> nns = nd->servalloc ();
|
|
if (needclose)
|
|
nns = close_simulate (nns);
|
|
@@ -400,20 +400,20 @@ sfsprog::cddispatch (svccb *sbp)
|
|
break;
|
|
}
|
|
case SFSCDPROC_UNMOUNT:
|
|
- if (sfsserver *s = pathtab[*sbp->template getarg<nfspath3> ()])
|
|
+ if (sfsserver *s = pathtab[*sbp->getarg<nfspath3> ()])
|
|
s->destroy ();
|
|
sbp->reply (NULL);
|
|
break;
|
|
case SFSCDPROC_FLUSHAUTH:
|
|
{
|
|
- sfs_aid aid = *sbp->template getarg<sfs_aid> ();
|
|
+ sfs_aid aid = *sbp->getarg<sfs_aid> ();
|
|
for (sfsserver *s = pathtab.first (); s; s = pathtab.next (s))
|
|
s->authclear (aid);
|
|
sbp->reply (NULL);
|
|
break;
|
|
}
|
|
case SFSCDPROC_CONDEMN:
|
|
- if (sfsserver *s = pathtab[*sbp->template getarg<nfspath3> ()])
|
|
+ if (sfsserver *s = pathtab[*sbp->getarg<nfspath3> ()])
|
|
s->condemn ();
|
|
sbp->reply (NULL);
|
|
break;
|
|
@@ -486,7 +486,7 @@ sfsprog::linkdispatch (nfscall *nc)
|
|
switch (nc->proc ()) {
|
|
case NFSPROC3_GETATTR:
|
|
{
|
|
- nfs_fh3 *arg = nc->template getarg<nfs_fh3> ();
|
|
+ nfs_fh3 *arg = nc->getarg<nfs_fh3> ();
|
|
getattr3res res (NFS3_OK);
|
|
mklnkfattr (res.attributes.addr (), arg);
|
|
nc->reply (&res);
|
|
@@ -494,7 +494,7 @@ sfsprog::linkdispatch (nfscall *nc)
|
|
}
|
|
case NFSPROC3_READLINK:
|
|
{
|
|
- nfs_fh3 *arg = nc->template getarg<nfs_fh3> ();
|
|
+ nfs_fh3 *arg = nc->getarg<nfs_fh3> ();
|
|
readlink3res res (NFS3_OK);
|
|
res.resok->symlink_attributes.set_present (true);
|
|
mklnkfattr (res.resok->symlink_attributes.attributes.addr (), arg);
|
|
@@ -532,7 +532,7 @@ sfsprog::intercept (sfsserver *s, nfscal
|
|
switch (nc->proc ()) {
|
|
case NFSPROC3_SETATTR:
|
|
{
|
|
- setattr3args *sar = nc->template getarg<setattr3args> ();
|
|
+ setattr3args *sar = nc->getarg<setattr3args> ();
|
|
sattr3 &sa = sar->new_attributes;
|
|
if (sa.mode.set || sa.size.set || sa.atime.set || sa.mtime.set
|
|
|| !sa.uid.set || !sa.gid.set || *sa.uid.val != (u_int32_t) -2)
|
|
@@ -544,7 +544,7 @@ sfsprog::intercept (sfsserver *s, nfscal
|
|
}
|
|
case NFSPROC3_LOOKUP:
|
|
{
|
|
- diropargs3 *arg = nc->template getarg<diropargs3> ();
|
|
+ diropargs3 *arg = nc->getarg<diropargs3> ();
|
|
if (strncmp (arg->name, SFSPREF, sizeof (SFSPREF) - 1))
|
|
return false;
|
|
lookup3res res (NFS3_OK);
|
|
@@ -701,12 +701,12 @@ sfsprog::sfsctl::dispatch (svccb *sbp)
|
|
sbp->reply (NULL);
|
|
return;
|
|
case SFSCTL_SETPID:
|
|
- setpid (*sbp->template getarg<int32_t> ());
|
|
+ setpid (*sbp->getarg<int32_t> ());
|
|
sbp->reply (NULL);
|
|
return;
|
|
}
|
|
|
|
- sfsserver *si = prog->pathtab[*sbp->template getarg<filename3> ()];
|
|
+ sfsserver *si = prog->pathtab[*sbp->getarg<filename3> ()];
|
|
if (!si) {
|
|
sfsctl_err (sbp, NFS3ERR_STALE);
|
|
return;
|
|
@@ -733,7 +733,7 @@ sfsprog::sfsctl::dispatch (svccb *sbp)
|
|
case SFSCTL_GETIDNAMES:
|
|
{
|
|
sfsctl_getidnames_arg *argp
|
|
- = sbp->template getarg<sfsctl_getidnames_arg> ();
|
|
+ = sbp->getarg<sfsctl_getidnames_arg> ();
|
|
sfs_idnames *resp = New sfs_idnames;
|
|
si->sfsc->call (SFSPROC_IDNAMES, &argp->nums, resp,
|
|
wrap (idnames_cb, sbp, resp), auth);
|
|
@@ -743,7 +743,7 @@ sfsprog::sfsctl::dispatch (svccb *sbp)
|
|
case SFSCTL_GETIDNUMS:
|
|
{
|
|
sfsctl_getidnums_arg *argp
|
|
- = sbp->template getarg<sfsctl_getidnums_arg> ();
|
|
+ = sbp->getarg<sfsctl_getidnums_arg> ();
|
|
sfs_idnums *resp = New sfs_idnums;
|
|
si->sfsc->call (SFSPROC_IDNUMS, &argp->names, resp,
|
|
wrap (idnums_cb, sbp, resp), auth);
|
|
@@ -761,7 +761,7 @@ sfsprog::sfsctl::dispatch (svccb *sbp)
|
|
case SFSCTL_LOOKUP:
|
|
{
|
|
sfsctl_lookup_arg *argp
|
|
- = sbp->template getarg<sfsctl_lookup_arg> ();
|
|
+ = sbp->getarg<sfsctl_lookup_arg> ();
|
|
lookup3res *resp = New lookup3res;
|
|
si->sfsc->call (NFSPROC3_LOOKUP, &argp->arg, resp,
|
|
wrap (lookup_cb, sbp, resp), auth,
|
|
@@ -772,7 +772,7 @@ sfsprog::sfsctl::dispatch (svccb *sbp)
|
|
case SFSCTL_GETACL:
|
|
{
|
|
sfsctl_getacl_arg *argp
|
|
- = sbp->template getarg<sfsctl_getacl_arg> ();
|
|
+ = sbp->getarg<sfsctl_getacl_arg> ();
|
|
ex_read3res *resp = New ex_read3res;
|
|
si->sfsc->call (ex_NFSPROC3_GETACL, &argp->arg, resp,
|
|
wrap (getacl_cb, sbp, resp), auth,
|
|
@@ -783,7 +783,7 @@ sfsprog::sfsctl::dispatch (svccb *sbp)
|
|
case SFSCTL_SETACL:
|
|
{
|
|
sfsctl_setacl_arg *argp
|
|
- = sbp->template getarg<sfsctl_setacl_arg> ();
|
|
+ = sbp->getarg<sfsctl_setacl_arg> ();
|
|
ex_write3res *resp = New ex_write3res;
|
|
si->sfsc->call (ex_NFSPROC3_SETACL, &argp->arg, resp,
|
|
wrap (setacl_cb, sbp, resp), auth,
|