From 247dcce2b5676abbd0109bdc2d74c36dff73609c Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Tue, 19 Jun 2018 20:58:44 +0000 Subject: [PATCH] *: fix source file headers & includes for errcodes * Use the correct license header * Stop headers from including themselves * Use uniform relative include conventions * Ensure that sources include what they use * Turn off clang-format around struct array blocks Signed-off-by: Quentin Young --- babeld/babel_errors.c | 23 +++++++++++++---------- babeld/babel_errors.h | 22 +++++++++++----------- bgpd/bgp_errors.c | 28 ++++++++++++++++------------ bgpd/bgp_errors.h | 22 +++++++++++----------- eigrpd/eigrp_errors.c | 23 +++++++++++++---------- eigrpd/eigrp_errors.h | 22 +++++++++++----------- isisd/isis_errors.c | 23 +++++++++++++---------- isisd/isis_errors.h | 22 +++++++++++----------- lib/lib_errors.c | 2 +- lib/lib_errors.h | 3 ++- nhrpd/nhrp_errors.c | 23 +++++++++++++---------- nhrpd/nhrp_errors.h | 22 +++++++++++----------- ospfd/ospf_errors.c | 24 +++++++++++++----------- ospfd/ospf_errors.h | 21 +++++++++++---------- pimd/pim_errors.c | 23 +++++++++++++---------- pimd/pim_errors.h | 22 +++++++++++----------- ripd/rip_errors.c | 21 +++++++++++---------- ripd/rip_errors.h | 22 +++++++++++----------- watchfrr/watchfrr_errors.c | 23 +++++++++++++---------- watchfrr/watchfrr_errors.h | 21 ++++++++++----------- zebra/zebra_errors.c | 3 ++- zebra/zebra_errors.h | 3 +-- 22 files changed, 222 insertions(+), 196 deletions(-) diff --git a/babeld/babel_errors.c b/babeld/babel_errors.c index ed780ea1bb..ffcc3867fc 100644 --- a/babeld/babel_errors.c +++ b/babeld/babel_errors.c @@ -1,27 +1,29 @@ /* - * babel_errors - code for error messages that may occur in the - * babel process + * Babel-specific error messages. * Copyright (C) 2018 Cumulus Networks, Inc. * Donald Sharp * - * FRR is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. + * 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 the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * FRR is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of 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 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 +#include "lib/ferr.h" #include "babel_errors.h" +/* clang-format off */ static struct ferr_ref ferr_babel_err[] = { { .code = BABEL_ERR_MEMORY, @@ -51,6 +53,7 @@ static struct ferr_ref ferr_babel_err[] = { .code = END_FERR, } }; +/* clang-format on */ void babel_error_init(void) { diff --git a/babeld/babel_errors.h b/babeld/babel_errors.h index a52b19481b..f03801272b 100644 --- a/babeld/babel_errors.h +++ b/babeld/babel_errors.h @@ -1,27 +1,27 @@ /* - * babel_errors - header for error messages that may occur in the babel process + * Babel-specific error messages. * Copyright (C) 2018 Cumulus Networks, Inc. * Donald Sharp * - * FRR is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. + * 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 the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * FRR is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of 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 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 */ + #ifndef __BABEL_ERRORS_H__ #define __BABEL_ERRORS_H__ -#include "ferr.h" -#include "babel_errors.h" +#include "lib/ferr.h" enum babel_ferr_refs { BABEL_ERR_MEMORY = BABEL_FERR_START, diff --git a/bgpd/bgp_errors.c b/bgpd/bgp_errors.c index 6cad8049a0..5535a2a8ad 100644 --- a/bgpd/bgp_errors.c +++ b/bgpd/bgp_errors.c @@ -1,26 +1,29 @@ /* - * bgp_errors - code for error messages that may occur in the - * bgp process + * BGP-specific error messages. * Copyright (C) 2018 Cumulus Networks, Inc. * Don Slice * - * FRR is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. + * 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 the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * FRR is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of 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 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 -#include +#include + +#include "lib/ferr.h" +#include "bgp_errors.h" + +/* clang-format off */ static struct ferr_ref ferr_bgp_err[] = { { .code = BGP_ERR_ATTR_FLAG, @@ -295,6 +298,7 @@ static struct ferr_ref ferr_bgp_err[] = { .code = END_FERR, } }; +/* clang-format on */ void bgp_error_init(void) { diff --git a/bgpd/bgp_errors.h b/bgpd/bgp_errors.h index 4bfb7af879..83b834688e 100644 --- a/bgpd/bgp_errors.h +++ b/bgpd/bgp_errors.h @@ -1,27 +1,27 @@ /* - * bgp_errors - header for error messages that may occur in the bgp process + * BGP-specific error messages. * Copyright (C) 2018 Cumulus Networks, Inc. * Don Slice * - * FRR is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. + * 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 the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * FRR is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of 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 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 */ + #ifndef __BGP_ERRORS_H__ #define __BGP_ERRORS_H__ -#include "ferr.h" -#include "bgp_errors.h" +#include "lib/ferr.h" enum bgp_ferr_refs { diff --git a/eigrpd/eigrp_errors.c b/eigrpd/eigrp_errors.c index 23a2af0056..5732fc39c8 100644 --- a/eigrpd/eigrp_errors.c +++ b/eigrpd/eigrp_errors.c @@ -1,27 +1,29 @@ /* - * eigrp_errors - code for error messages that may occur in the - * eigrp process + * EIGRP-specific error messages. * Copyright (C) 2018 Cumulus Networks, Inc. * Donald Sharp * - * FRR is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. + * 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 the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * FRR is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of 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 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 +#include "lib/ferr.h" #include "eigrp_errors.h" +/* clang-format off */ static struct ferr_ref ferr_eigrp_err[] = { { .code = EIGRP_ERR_PACKET, @@ -39,6 +41,7 @@ static struct ferr_ref ferr_eigrp_err[] = { .code = END_FERR, } }; +/* clang-format on */ void eigrp_error_init(void) { diff --git a/eigrpd/eigrp_errors.h b/eigrpd/eigrp_errors.h index c314ddc465..e59a5d1e6e 100644 --- a/eigrpd/eigrp_errors.h +++ b/eigrpd/eigrp_errors.h @@ -1,27 +1,27 @@ /* - * eigrp_errors - header for error messages that may occur in the eigrp process + * EIGRP-specific error messages. * Copyright (C) 2018 Cumulus Networks, Inc. * Donald Sharp * - * FRR is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. + * 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 the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * FRR is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of 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 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 */ + #ifndef __EIGRP_ERRORS_H__ #define __EIGRP_ERRORS_H__ -#include "ferr.h" -#include "eigrp_errors.h" +#include "lib/ferr.h" enum eigrp_ferr_refs { EIGRP_ERR_PACKET = EIGRP_FERR_START, diff --git a/isisd/isis_errors.c b/isisd/isis_errors.c index 154ba2bb5b..d7425153a3 100644 --- a/isisd/isis_errors.c +++ b/isisd/isis_errors.c @@ -1,27 +1,29 @@ /* - * isis_errors - code for error messages that may occur in the - * isis process + * ISIS-specific error messages. * Copyright (C) 2018 Cumulus Networks, Inc. * Donald Sharp * - * FRR is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. + * 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 the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * FRR is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of 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 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 +#include "lib/ferr.h" #include "isis_errors.h" +/* clang-format off */ static struct ferr_ref ferr_isis_err[] = { { .code = ISIS_ERR_PACKET, @@ -39,6 +41,7 @@ static struct ferr_ref ferr_isis_err[] = { .code = END_FERR, } }; +/* clang-format on */ void isis_error_init(void) { diff --git a/isisd/isis_errors.h b/isisd/isis_errors.h index d92a4e4038..ffb000f9c9 100644 --- a/isisd/isis_errors.h +++ b/isisd/isis_errors.h @@ -1,27 +1,27 @@ /* - * isis_errors - header for error messages that may occur in the isis process + * ISIS-specific error messages. * Copyright (C) 2018 Cumulus Networks, Inc. * Donald Sharp * - * FRR is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. + * 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 the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * FRR is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of 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 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 */ + #ifndef __ISIS_ERRORS_H__ #define __ISIS_ERRORS_H__ -#include "ferr.h" -#include "isis_errors.h" +#include "lib/ferr.h" enum isis_ferr_refs { ISIS_ERR_PACKET = ISIS_FERR_START, diff --git a/lib/lib_errors.c b/lib/lib_errors.c index f53ff4e016..e08b03f17f 100644 --- a/lib/lib_errors.c +++ b/lib/lib_errors.c @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include +#include "lib_errors.h" /* clang-format off */ static struct ferr_ref ferr_lib_err[] = { diff --git a/lib/lib_errors.h b/lib/lib_errors.h index 9e3383793a..8be33ae254 100644 --- a/lib/lib_errors.h +++ b/lib/lib_errors.h @@ -17,10 +17,11 @@ * 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 */ + #ifndef __LIB_ERRORS_H__ #define __LIB_ERRORS_H__ -#include "ferr.h" +#include "lib/ferr.h" enum lib_ferr_refs { LIB_ERR_PRIVILEGES = LIB_FERR_START, diff --git a/nhrpd/nhrp_errors.c b/nhrpd/nhrp_errors.c index f0b2dcfc5b..71ec211136 100644 --- a/nhrpd/nhrp_errors.c +++ b/nhrpd/nhrp_errors.c @@ -1,27 +1,29 @@ /* - * nhrp_errors - code for error messages that may occur in the - * nhrp process + * NHRP-specific error messages. * Copyright (C) 2018 Cumulus Networks, Inc. * Donald Sharp * - * FRR is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. + * 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 the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * FRR is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of 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 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 +#include "lib/ferr.h" #include "nhrp_errors.h" +/* clang-format off */ static struct ferr_ref ferr_nhrp_err[] = { { .code = NHRP_ERR_SWAN, @@ -39,6 +41,7 @@ static struct ferr_ref ferr_nhrp_err[] = { .code = END_FERR, } }; +/* clang-format on */ void nhrp_error_init(void) { diff --git a/nhrpd/nhrp_errors.h b/nhrpd/nhrp_errors.h index 2b3da04f7e..842af82012 100644 --- a/nhrpd/nhrp_errors.h +++ b/nhrpd/nhrp_errors.h @@ -1,27 +1,27 @@ /* - * nhrp_errors - header for error messages that may occur in the nhrp process + * NHRP-specific error messages. * Copyright (C) 2018 Cumulus Networks, Inc. * Donald Sharp * - * FRR is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. + * 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 the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * FRR is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of 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 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 */ + #ifndef __NHRP_ERRORS_H__ #define __NHRP_ERRORS_H__ -#include "ferr.h" -#include "nhrp_errors.h" +#include "lib/ferr.h" enum nhrp_ferr_refs { NHRP_ERR_SWAN = NHRP_FERR_START, diff --git a/ospfd/ospf_errors.c b/ospfd/ospf_errors.c index 7f94080ceb..f4ae731a9b 100644 --- a/ospfd/ospf_errors.c +++ b/ospfd/ospf_errors.c @@ -1,24 +1,26 @@ /* - * ospf_errors - code for error messages that may occur in the - * ospf process + * OSPF-specific error messages. * Copyright (C) 2018 Cumulus Networks, Inc. - * Chirag Shah + * Chirag Shah * - * FRR is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. + * 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 the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * FRR is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of 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 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 + +#include "lib/ferr.h" #include "ospf_errors.h" static struct ferr_ref ferr_ospf_err[] = { diff --git a/ospfd/ospf_errors.h b/ospfd/ospf_errors.h index a9813640f9..0ba2d45e49 100644 --- a/ospfd/ospf_errors.h +++ b/ospfd/ospf_errors.h @@ -1,26 +1,27 @@ /* - * ospf_errors - header for error messages that may occur in the ospf process + * OSPF-specific error messages. * Copyright (C) 2018 Cumulus Networks, Inc. * Chirag Shah * - * FRR is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. + * 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 the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * FRR is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of 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 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 */ + #ifndef __OSPF_ERRORS_H__ #define __OSPF_ERRORS_H__ -#include "ferr.h" +#include "lib/ferr.h" enum ospf_ferr_refs { OSPF_ERR_PKT_PROCESS = OSPF_FERR_START, diff --git a/pimd/pim_errors.c b/pimd/pim_errors.c index ffffa8dd9f..15f0345f0c 100644 --- a/pimd/pim_errors.c +++ b/pimd/pim_errors.c @@ -1,27 +1,29 @@ /* - * pim_errors - code for error messages that may occur in the - * pim process + * PIM-specific error messages. * Copyright (C) 2018 Cumulus Networks, Inc. * Donald Sharp * - * FRR is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. + * 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 the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * FRR is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of 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 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 +#include "lib/ferr.h" #include "pim_errors.h" +/* clang-format off */ static struct ferr_ref ferr_pim_err[] = { { .code = PIM_ERR_MSDP_PACKET, @@ -39,6 +41,7 @@ static struct ferr_ref ferr_pim_err[] = { .code = END_FERR, } }; +/* clang-format on */ void pim_error_init(void) { diff --git a/pimd/pim_errors.h b/pimd/pim_errors.h index bcb1628e62..86d2687feb 100644 --- a/pimd/pim_errors.h +++ b/pimd/pim_errors.h @@ -1,27 +1,27 @@ /* - * pim_errors - header for error messages that may occur in the pim process + * PIM-specific error messages. * Copyright (C) 2018 Cumulus Networks, Inc. * Donald Sharp * - * FRR is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. + * 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 the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * FRR is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of 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 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 */ + #ifndef __PIM_ERRORS_H__ #define __PIM_ERRORS_H__ -#include "ferr.h" -#include "pim_errors.h" +#include "lib/ferr.h" enum pim_ferr_refs { PIM_ERR_MSDP_PACKET = PIM_FERR_START, diff --git a/ripd/rip_errors.c b/ripd/rip_errors.c index 9fefec6841..4a2a2bd5a9 100644 --- a/ripd/rip_errors.c +++ b/ripd/rip_errors.c @@ -1,25 +1,26 @@ /* - * rip_errors - code for error messages that may occur in the - * rip process + * RIP-specific error messages. * Copyright (C) 2018 Cumulus Networks, Inc. * Donald Sharp * - * FRR is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. + * 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 the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * FRR is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of 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 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 +#include "lib/ferr.h" #include "rip_errors.h" static struct ferr_ref ferr_rip_err[] = { diff --git a/ripd/rip_errors.h b/ripd/rip_errors.h index 6e2bdfc9eb..ff5851d095 100644 --- a/ripd/rip_errors.h +++ b/ripd/rip_errors.h @@ -1,27 +1,27 @@ /* - * rip_errors - header for error messages that may occur in the rip process + * RIP-specific error messages. * Copyright (C) 2018 Cumulus Networks, Inc. * Donald Sharp * - * FRR is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. + * 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 the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * FRR is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of 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 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 */ + #ifndef __RIP_ERRORS_H__ #define __RIP_ERRORS_H__ -#include "ferr.h" -#include "rip_errors.h" +#include "lib/ferr.h" enum rip_ferr_refs { RIP_ERR_PACKET = RIP_FERR_START, diff --git a/watchfrr/watchfrr_errors.c b/watchfrr/watchfrr_errors.c index 6b0f688121..9a4842a5df 100644 --- a/watchfrr/watchfrr_errors.c +++ b/watchfrr/watchfrr_errors.c @@ -1,27 +1,29 @@ /* - * watchfrr_errors - code for error messages that may occur in the - * watchfrr process + * Watchfrr-specific error messages. * Copyright (C) 2018 Cumulus Networks, Inc. * Donald Sharp * - * FRR is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. + * 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 the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * FRR is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of 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 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 +#include "lib/ferr.h" #include "watchfrr_errors.h" +/* clang-format off */ static struct ferr_ref ferr_watchfrr_err[] = { { .code = WATCHFRR_ERR_CONNECTION, @@ -33,6 +35,7 @@ static struct ferr_ref ferr_watchfrr_err[] = { .code = END_FERR, } }; +/* clang-format on */ void watchfrr_error_init(void) { diff --git a/watchfrr/watchfrr_errors.h b/watchfrr/watchfrr_errors.h index bc0cc6f561..9d2912da46 100644 --- a/watchfrr/watchfrr_errors.h +++ b/watchfrr/watchfrr_errors.h @@ -1,28 +1,27 @@ /* - * watchfrr_errors - header for error messages that may occur in the - * watchfrr process + * Watchfrr-specific error messages. * Copyright (C) 2018 Cumulus Networks, Inc. * Donald Sharp * - * FRR is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. + * 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 the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * FRR is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of 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 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 */ + #ifndef __WATCHFRR_ERRORS_H__ #define __WATCHFRR_ERRORS_H__ #include "lib/ferr.h" -#include "watchfrr_errors.h" enum watchfrr_ferr_refs { WATCHFRR_ERR_CONNECTION = WATCHFRR_FERR_START, diff --git a/zebra/zebra_errors.c b/zebra/zebra_errors.c index 3f981bc5ef..f657bdcdc7 100644 --- a/zebra/zebra_errors.c +++ b/zebra/zebra_errors.c @@ -19,8 +19,9 @@ */ #include + +#include "lib/ferr.h" #include "zebra_errors.h" -#include "ferr.h" /* clang-format off */ static struct ferr_ref ferr_zebra_err[] = { diff --git a/zebra/zebra_errors.h b/zebra/zebra_errors.h index eea7af5c58..66771a33d6 100644 --- a/zebra/zebra_errors.h +++ b/zebra/zebra_errors.h @@ -21,8 +21,7 @@ #ifndef __ZEBRA_ERRORS_H__ #define __ZEBRA_ERRORS_H__ -#include -#include "ferr.h" +#include "lib/ferr.h" enum zebra_ferr_refs { ZEBRA_ERR_LM_RESPONSE,