* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
int ret = distfn(ifname, type, argv[2 + prefix]->arg);
if (!ret) {
- vty_out(vty, "distribute list doesn't exist%s", VTY_NEWLINE);
- return CMD_WARNING;
+ vty_out(vty, "distribute list doesn't exist\n");
+ return CMD_WARNING_CONFIG_FAILED;
}
return CMD_SUCCESS;
}
DISTRIBUTE_V6_OUT, has_print);
}
if (has_print)
- vty_out(vty, "%s", VTY_NEWLINE);
+ vty_out(vty, "\n");
else
- vty_out(vty, " not set%s", VTY_NEWLINE);
+ vty_out(vty, " not set\n");
for (i = 0; i < disthash->size; i++)
for (mp = disthash->index[i]; mp; mp = mp->next) {
vty, dist->prefix, 1, DISTRIBUTE_V6_OUT,
has_print);
if (has_print)
- vty_out(vty, "%s", VTY_NEWLINE);
+ vty_out(vty, "\n");
else
- vty_out(vty, " nothing%s", VTY_NEWLINE);
+ vty_out(vty, " nothing\n");
}
}
DISTRIBUTE_V6_IN, has_print);
}
if (has_print)
- vty_out(vty, "%s", VTY_NEWLINE);
+ vty_out(vty, "\n");
else
- vty_out(vty, " not set%s", VTY_NEWLINE);
+ vty_out(vty, " not set\n");
for (i = 0; i < disthash->size; i++)
for (mp = disthash->index[i]; mp; mp = mp->next) {
vty, dist->prefix, 1, DISTRIBUTE_V6_IN,
has_print);
if (has_print)
- vty_out(vty, "%s", VTY_NEWLINE);
+ vty_out(vty, "\n");
else
- vty_out(vty, " nothing%s", VTY_NEWLINE);
+ vty_out(vty, " nothing\n");
}
}
return 0;
v6 = j == DISTRIBUTE_V6_IN
|| j == DISTRIBUTE_V6_OUT;
vty_out(vty,
- " %sdistribute-list %s %s %s%s",
+ " %sdistribute-list %s %s %s\n",
v6 ? "ipv6 " : "",
dist->list[j],
output ? "out" : "in",
dist->ifname ? dist->ifname
- : "",
- VTY_NEWLINE);
+ : "");
write++;
}
v6 = j == DISTRIBUTE_V6_IN
|| j == DISTRIBUTE_V6_OUT;
vty_out(vty,
- " %sdistribute-list prefix %s %s %s%s",
+ " %sdistribute-list prefix %s %s %s\n",
v6 ? "ipv6 " : "",
dist->prefix[j],
output ? "out" : "in",
dist->ifname ? dist->ifname
- : "",
- VTY_NEWLINE);
+ : "");
write++;
}
}
{
disthash = hash_create(
distribute_hash_make,
- (int (*)(const void *, const void *))distribute_cmp);
+ (int (*)(const void *, const void *))distribute_cmp, NULL);
/* vtysh command-extraction doesn't grok install_element(node, ) */
if (node == RIP_NODE) {