From 8a1c3ddd947039bf3b62efd94d3429359b593e15 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 20 Sep 2004 07:28:43 +0000 Subject: r2436: the second big lump of posix vfs code. this is still just a skeleton, and many of the functions are just based on the simple vfs backend, they are there to allow me to run smbtorture tests against the real parts of the posix backend. (This used to be commit f2fa7fe565e89360dba3bb5434d3a6a36f398348) --- source4/ntvfs/posix/pvfs_shortname.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source4/ntvfs/posix/pvfs_shortname.c') diff --git a/source4/ntvfs/posix/pvfs_shortname.c b/source4/ntvfs/posix/pvfs_shortname.c index b68f60d5e7..fe6fd8e030 100644 --- a/source4/ntvfs/posix/pvfs_shortname.c +++ b/source4/ntvfs/posix/pvfs_shortname.c @@ -26,9 +26,10 @@ /* return the short name for a given entry in a directory + TODO: this is obviously not very useful in its current form ! */ -char *pvfs_short_name(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx, - const char *unix_path, const char *name) +char *pvfs_short_name(struct pvfs_state *pvfs, struct pvfs_filename *name) { - return talloc_strndup(mem_ctx, name, 12); + char *p = strrchr(name->full_name, '/'); + return talloc_strndup(name, p+1, 12); } -- cgit