1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-23 09:57:40 +03:00

Use WERR_FILE_EXISTS which is the equivalent of WERR_ALREADY_EXISTS

previously present in Samba 3.
This commit is contained in:
Jelmer Vernooij 2008-10-23 15:37:39 +02:00
parent 44b728958a
commit f9fb9436ae
6 changed files with 6 additions and 6 deletions

View File

@ -172,7 +172,7 @@ WERROR smbconf_create_share(struct smbconf_ctx *ctx,
const char *servicename)
{
if ((servicename != NULL) && smbconf_share_exists(ctx, servicename)) {
return WERR_ALREADY_EXISTS;
return WERR_FILE_EXISTS;
}
return ctx->ops->create_share(ctx, servicename);

View File

@ -208,7 +208,7 @@ static WERROR smbconf_reg_create_service_key(TALLOC_CTX *mem_ctx,
REG_KEY_WRITE, newkey, &action);
if (W_ERROR_IS_OK(werr) && (action != REG_CREATED_NEW_KEY)) {
DEBUG(10, ("Key '%s' already exists.\n", subkeyname));
werr = WERR_ALREADY_EXISTS;
werr = WERR_FILE_EXISTS;
}
if (!W_ERROR_IS_OK(werr)) {
DEBUG(5, ("Error creating key %s: %s\n",

View File

@ -42,7 +42,7 @@ werror_code_struct dos_errs[] =
{ "WERR_INSUFFICIENT_BUFFER", WERR_INSUFFICIENT_BUFFER },
{ "WERR_SEM_TIMEOUT", WERR_SEM_TIMEOUT },
{ "WERR_NO_SUCH_SHARE", WERR_NO_SUCH_SHARE },
{ "WERR_ALREADY_EXISTS", WERR_ALREADY_EXISTS },
{ "WERR_FILE_EXISTS", WERR_FILE_EXISTS },
{ "WERR_INVALID_PARAM", WERR_INVALID_PARAM },
{ "WERR_NOT_SUPPORTED", WERR_NOT_SUPPORTED },
{ "WERR_BAD_PASSWORD", WERR_BAD_PASSWORD },

View File

@ -8490,7 +8490,7 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM
/* can't add if builtin */
if (get_a_builtin_ntform(&form->name,&tmpForm)) {
status = WERR_ALREADY_EXISTS;
status = WERR_FILE_EXISTS;
goto done;
}

View File

@ -1781,7 +1781,7 @@ WERROR _srvsvc_NetShareAdd(pipes_struct *p,
/* Share already exists. */
if (snum >= 0) {
return WERR_ALREADY_EXISTS;
return WERR_FILE_EXISTS;
}
/* We can only add disk shares. */

View File

@ -3126,7 +3126,7 @@ static NTSTATUS rpc_share_migrate_shares_internals(struct net_context *c,
&parm_error,
&result);
if (W_ERROR_V(result) == W_ERROR_V(WERR_ALREADY_EXISTS)) {
if (W_ERROR_V(result) == W_ERROR_V(WERR_FILE_EXISTS)) {
printf(" [%s] does already exist\n",
info502.name);
continue;