From 694786b23c30e0a3449c7222433e3fdc7ef7c0e1 Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Wed, 24 Sep 2008 23:23:01 +0200 Subject: net: Make share type lookup a function. --- source3/utils/net_util.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source3/utils/net_util.c') diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c index 88850d29df..fbb3c24b03 100644 --- a/source3/utils/net_util.c +++ b/source3/utils/net_util.c @@ -2,6 +2,7 @@ * Unix SMB/CIFS implementation. * Helper routines for net * Copyright (C) Volker Lendecke 2006 + * Copyright (C) Kai Blin 2008 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -595,3 +596,14 @@ void net_display_usage_from_functable(struct functable *table) d_printf("%s\n", table[i].usage); } } + +const char *net_share_type_str(int num_type) +{ + switch(num_type) { + case 0: return "Disk"; + case 1: return "Print"; + case 2: return "Dev"; + case 3: return "IPC"; + default: return "Unknown"; + } +} -- cgit