summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-01-25 02:42:59 +0100
committerGünther Deschner <gd@samba.org>2011-01-25 12:27:00 +0100
commitc9f4fad75cf9749709cbebfe55c59f3c2d01858e (patch)
tree8327f107882dc201218912431baf53e97d5cc2a7 /source3
parentf0b3c72bcc119f497a4379c549bc55fb1031ce90 (diff)
downloadsamba-c9f4fad75cf9749709cbebfe55c59f3c2d01858e.tar.gz
samba-c9f4fad75cf9749709cbebfe55c59f3c2d01858e.tar.bz2
samba-c9f4fad75cf9749709cbebfe55c59f3c2d01858e.zip
idl: add file_id idl.
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Tue Jan 25 12:27:00 CET 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in2
-rw-r--r--source3/include/locking.h9
-rw-r--r--source3/include/proto.h3
-rw-r--r--source3/librpc/idl/notify.idl2
-rw-r--r--source3/librpc/ndr/util.c39
-rw-r--r--source3/librpc/wscript_build2
6 files changed, 5 insertions, 52 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 0ce97b8ca3..5a4435badb 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -769,7 +769,7 @@ OPLOCK_OBJ = smbd/oplock.o smbd/oplock_irix.o smbd/oplock_linux.o \
smbd/oplock_onefs.o
NOTIFY_OBJ = smbd/notify.o smbd/notify_inotify.o smbd/notify_internal.o \
- librpc/gen_ndr/ndr_notify.o
+ librpc/gen_ndr/ndr_notify.o librpc/gen_ndr/ndr_file_id.o
FNAME_UTIL_OBJ = smbd/filename_util.o
diff --git a/source3/include/locking.h b/source3/include/locking.h
index 88104b0fef..5504da6dc3 100644
--- a/source3/include/locking.h
+++ b/source3/include/locking.h
@@ -43,14 +43,7 @@ struct lock_context {
struct files_struct;
-struct file_id {
- /* we don't use SMB_DEV_T and SMB_INO_T as we want a fixed size here,
- and we may be using file system specific code to fill in something
- other than a dev_t for the device */
- uint64_t devid;
- uint64_t inode;
- uint64_t extid; /* Support systems that use an extended id (e.g. snapshots). */
-};
+#include "../librpc/gen_ndr/file_id.h"
struct byte_range_lock {
struct files_struct *fsp;
diff --git a/source3/include/proto.h b/source3/include/proto.h
index a3597cc2c8..29dbcc9763 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1584,9 +1584,6 @@ unsigned wins_srv_count_tag(const char *tag);
enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r);
enum ndr_err_code ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_id *r);
void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct server_id *r);
-enum ndr_err_code ndr_push_file_id(struct ndr_push *ndr, int ndr_flags, const struct file_id *r);
-enum ndr_err_code ndr_pull_file_id(struct ndr_pull *ndr, int ndr_flags, struct file_id *r);
-void ndr_print_file_id(struct ndr_print *ndr, const char *name, const struct file_id *r);
_PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss);
const char *ndr_errstr(enum ndr_err_code err);
extern const struct ndr_syntax_id null_ndr_syntax_id;
diff --git a/source3/librpc/idl/notify.idl b/source3/librpc/idl/notify.idl
index 040f661b33..e776d5d715 100644
--- a/source3/librpc/idl/notify.idl
+++ b/source3/librpc/idl/notify.idl
@@ -1,5 +1,7 @@
#include "idl_types.h"
+import "file_id.idl";
+
/*
IDL structures for notify change code
diff --git a/source3/librpc/ndr/util.c b/source3/librpc/ndr/util.c
index 225d520ca6..ed24f87387 100644
--- a/source3/librpc/ndr/util.c
+++ b/source3/librpc/ndr/util.c
@@ -161,45 +161,6 @@ void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct s
ndr->depth--;
}
-enum ndr_err_code ndr_push_file_id(struct ndr_push *ndr, int ndr_flags, const struct file_id *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS,
- (uint64_t)r->devid));
- NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS,
- (uint64_t)r->inode));
- NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS,
- (uint64_t)r->extid));
- }
- if (ndr_flags & NDR_BUFFERS) {
- }
- return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_file_id(struct ndr_pull *ndr, int ndr_flags, struct file_id *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->devid));
- NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->inode));
- NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->extid));
- }
- if (ndr_flags & NDR_BUFFERS) {
- }
- return NDR_ERR_SUCCESS;
-}
-
-void ndr_print_file_id(struct ndr_print *ndr, const char *name, const struct file_id *r)
-{
- ndr_print_struct(ndr, name, "file_id");
- ndr->depth++;
- ndr_print_udlong(ndr, "devid", (uint64_t)r->devid);
- ndr_print_udlong(ndr, "inode", (uint64_t)r->inode);
- ndr_print_udlong(ndr, "extid", (uint64_t)r->extid);
- ndr->depth--;
-}
-
_PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss)
{
char addr[INET6_ADDRSTRLEN];
diff --git a/source3/librpc/wscript_build b/source3/librpc/wscript_build
index 5b305075bd..adf7f70c49 100644
--- a/source3/librpc/wscript_build
+++ b/source3/librpc/wscript_build
@@ -17,7 +17,7 @@ bld.SAMBA_SUBSYSTEM('NDR_MESSAGING',
bld.SAMBA_SUBSYSTEM('NDR_NOTIFY',
source='gen_ndr/ndr_notify.c',
- public_deps='ndr'
+ public_deps='ndr NDR_FILE_ID'
)
bld.SAMBA_SUBSYSTEM('NDR_PREG',