Module Name: src
Committed By: riz
Date: Sun Oct 16 23:48:11 UTC 2011
Modified Files:
src/sbin/ifconfig [netbsd-5]: carp.c
Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1670):
sbin/ifconfig/carp.c: revision 1.13
This should fix 'carpdev <ifname>' or, at least, not break it more
badly than before.
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.2.1 src/sbin/ifconfig/carp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/ifconfig/carp.c
diff -u src/sbin/ifconfig/carp.c:1.12 src/sbin/ifconfig/carp.c:1.12.2.1
--- src/sbin/ifconfig/carp.c:1.12 Tue Jul 15 21:27:58 2008
+++ src/sbin/ifconfig/carp.c Sun Oct 16 23:48:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: carp.c,v 1.12 2008/07/15 21:27:58 dyoung Exp $ */
+/* $NetBSD: carp.c,v 1.12.2.1 2011/10/16 23:48:11 riz Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: carp.c,v 1.12 2008/07/15 21:27:58 dyoung Exp $");
+__RCSID("$NetBSD: carp.c,v 1.12.2.1 2011/10/16 23:48:11 riz Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -257,18 +257,18 @@ int
setcarpdev(prop_dictionary_t env, prop_dictionary_t oenv)
{
struct carpreq carpr;
- prop_data_t data;
+ prop_string_t s;
- data = (prop_data_t)prop_dictionary_get(env, "carpdev");
- if (data == NULL) {
+ s = (prop_string_t)prop_dictionary_get(env, "carpdev");
+ if (s == NULL) {
errno = ENOENT;
return -1;
}
carp_get(env, &carpr);
- strlcpy(carpr.carpr_carpdev, prop_data_data_nocopy(data),
- MIN(sizeof(carpr.carpr_carpdev), prop_data_size(data)));
+ strlcpy(carpr.carpr_carpdev, prop_string_cstring_nocopy(s),
+ sizeof(carpr.carpr_carpdev));
carp_set(env, &carpr);
return 0;