attr->nlink = stbuf->st_nlink;
attr->uid = stbuf->st_uid;
attr->gid = stbuf->st_gid;
+#if defined(__SOLARIS__) && defined(_LP64)
+ /* Must pack the device the old way (attr->rdev limited to 32 bits) */
+ attr->rdev = ((major(stbuf->st_rdev) & 0x3fff) << 18)
+ | (minor(stbuf->st_rdev) & 0x3ffff);
+#else
attr->rdev = stbuf->st_rdev;
+#endif
attr->size = stbuf->st_size;
attr->blocks = stbuf->st_blocks;
attr->atime = stbuf->st_atime;
else
name = (const char *) inarg + FUSE_COMPAT_MKNOD_IN_SIZE;
- if (req->f->op.mknod)
+ if (req->f->op.mknod) {
+#if defined(__SOLARIS__) && defined(_LP64)
+ /* Must unpack the device, as arg->rdev is limited to 32 bits */
+ req->f->op.mknod(req, nodeid, name, arg->mode,
+ makedev((arg->rdev >> 18) & 0x3ffff,
+ arg->rdev & 0x3fff));
+#else
req->f->op.mknod(req, nodeid, name, arg->mode, arg->rdev);
- else
+#endif
+ } else
fuse_reply_err(req, ENOSYS);
}