tree-wide: place #pragma once at the same place everywhere

Usually, we place the #pragma once before the copyright blurb in header files,
but in a few cases we didn't. Move those around, so that we do the same thing
everywhere.
This commit is contained in:
Lennart Poettering 2016-02-16 20:05:15 +01:00
parent 358977458b
commit 0ef6f45425
42 changed files with 82 additions and 85 deletions

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include <stdbool.h> #include <stdbool.h>
#include "path-lookup.h" #include "path-lookup.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <sys/types.h> #include <sys/types.h>

View file

@ -1,11 +1,11 @@
#pragma once
/* gunicode.h - Unicode manipulation functions /* gunicode.h - Unicode manipulation functions
* *
* Copyright (C) 1999, 2000 Tom Tromey * Copyright (C) 1999, 2000 Tom Tromey
* Copyright 2000, 2005 Red Hat, Inc. * Copyright 2000, 2005 Red Hat, Inc.
*/ */
#pragma once
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include <stdbool.h> #include <stdbool.h>
#include <unistd.h> #include <unistd.h>

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
void sigbus_install(void); void sigbus_install(void);
void sigbus_reset(void); void sigbus_reset(void);

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include "sd-event.h" #include "sd-event.h"
#include "journal-remote-write.h" #include "journal-remote-write.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,9 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include "journal-file.h" #include "journal-file.h"
typedef struct RemoteServer RemoteServer; typedef struct RemoteServer RemoteServer;

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,9 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include "sd-event.h" #include "sd-event.h"
#include "hashmap.h" #include "hashmap.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include <microhttpd.h> #include <microhttpd.h>
#include <stdarg.h> #include <stdarg.h>

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -18,8 +20,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include "sd-dhcp-server.h" #include "sd-dhcp-server.h"
#include "sd-event.h" #include "sd-event.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -18,8 +20,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include "sd-event.h" #include "sd-event.h"
#include "list.h" #include "list.h"

View file

@ -53,7 +53,6 @@ int lldp_network_bind_raw_socket(int ifindex) {
}; };
_cleanup_close_ int fd = -1; _cleanup_close_ int fd = -1;
int r; int r;
assert(ifindex > 0); assert(ifindex > 0);

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -18,8 +20,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include "sd-event.h" #include "sd-event.h"
int lldp_network_bind_raw_socket(int ifindex); int lldp_network_bind_raw_socket(int ifindex);

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -18,8 +20,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include <net/ethernet.h> #include <net/ethernet.h>
#include "sd-lldp.h" #include "sd-lldp.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -18,8 +20,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#define LLDP_MULTICAST_ADDR { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x0e } #define LLDP_MULTICAST_ADDR { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x0e }
/* IEEE 802.3AB Clause 9: TLV Types */ /* IEEE 802.3AB Clause 9: TLV Types */

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -18,8 +20,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include "hashmap.h" #include "hashmap.h"
#include "set.h" #include "set.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -16,7 +18,6 @@
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include "sparse-endian.h" #include "sparse-endian.h"
#include "util.h" #include "util.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -18,8 +20,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include "libudev.h" #include "libudev.h"
#include "sd-device.h" #include "sd-device.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
typedef struct Bridge Bridge; typedef struct Bridge Bridge;
#include "networkd-netdev.h" #include "networkd-netdev.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
typedef struct Dummy Dummy; typedef struct Dummy Dummy;
#include "networkd-netdev.h" #include "networkd-netdev.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
typedef struct IPVlan IPVlan; typedef struct IPVlan IPVlan;
#include "missing.h" #include "missing.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
typedef struct MacVlan MacVlan; typedef struct MacVlan MacVlan;
#include "networkd-netdev.h" #include "networkd-netdev.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
typedef struct Tunnel Tunnel; typedef struct Tunnel Tunnel;
#include "networkd-netdev.h" #include "networkd-netdev.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
typedef struct TunTap TunTap; typedef struct TunTap TunTap;
#include "networkd-netdev.h" #include "networkd-netdev.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
typedef struct Veth Veth; typedef struct Veth Veth;
#include "networkd-netdev.h" #include "networkd-netdev.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
typedef struct VLan VLan; typedef struct VLan VLan;
#include "networkd-netdev.h" #include "networkd-netdev.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
typedef struct VxLan VxLan; typedef struct VxLan VxLan;
#include "in-addr-util.h" #include "in-addr-util.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include "list.h" #include "list.h"
typedef struct NetDev NetDev; typedef struct NetDev NetDev;

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include "sd-event.h" #include "sd-event.h"
#include "sd-netlink.h" #include "sd-netlink.h"
#include "sd-network.h" #include "sd-network.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include <arpa/inet.h> #include <arpa/inet.h>
#include "sd-bus.h" #include "sd-bus.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include "macro.h" #include "macro.h"
/* DNS record types, taken from /* DNS record types, taken from

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,9 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include <errno.h> #include <errno.h>
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h> #include <stddef.h>

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include <endian.h> #include <endian.h>
#include "sd-id128.h" #include "sd-id128.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include "install.h" #include "install.h"
int install_full_printf(UnitFileInstallInfo *i, const char *format, char **ret); int install_full_printf(UnitFileInstallInfo *i, const char *format, char **ret);

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
int parse_sleep_config(const char *verb, char ***modes, char ***states); int parse_sleep_config(const char *verb, char ***modes, char ***states);
int can_sleep(const char *verb); int can_sleep(const char *verb);

View file

@ -1,3 +1,5 @@
#pragma once
/* /*
* Copyright (C) 2010 - Maxim Levitsky * Copyright (C) 2010 - Maxim Levitsky
* *
@ -17,8 +19,6 @@
* Boston, MA 02110-1301 USA * Boston, MA 02110-1301 USA
*/ */
#pragma once
#include <mtd/mtd-user.h> #include <mtd/mtd-user.h>
#include "macro.h" #include "macro.h"

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include <macro.h> #include <macro.h>
/* we can't use DUPLEX_ prefix, as it /* we can't use DUPLEX_ prefix, as it

View file

@ -1,3 +1,5 @@
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
@ -17,8 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once
#include "libudev.h" #include "libudev.h"
#include "condition.h" #include "condition.h"

View file

@ -1,3 +1,5 @@
#pragma once
/* /*
* scsi.h * scsi.h
* *
@ -10,8 +12,6 @@
* Free Software Foundation version 2 of the License. * Free Software Foundation version 2 of the License.
*/ */
#pragma once
#include <scsi/scsi.h> #include <scsi/scsi.h>
struct scsi_ioctl_command { struct scsi_ioctl_command {

View file

@ -1,3 +1,5 @@
#pragma once
/* /*
* Copyright (C) IBM Corp. 2003 * Copyright (C) IBM Corp. 2003
* *
@ -15,8 +17,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#define MAX_PATH_LEN 512 #define MAX_PATH_LEN 512
/* /*

View file

@ -1,3 +1,5 @@
#pragma once
/* /*
* Copyright (C) 2003 Greg Kroah-Hartman <greg@kroah.com> * Copyright (C) 2003 Greg Kroah-Hartman <greg@kroah.com>
* Copyright (C) 2003-2010 Kay Sievers <kay@vrfy.org> * Copyright (C) 2003-2010 Kay Sievers <kay@vrfy.org>
@ -16,8 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#include <sys/param.h> #include <sys/param.h>
#include <sys/types.h> #include <sys/types.h>

View file

@ -1,3 +1,5 @@
#pragma once
/* /*
* Copyright (C) 2014 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> * Copyright (C) 2014 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
* *
@ -15,8 +17,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#include "udev.h" #include "udev.h"
struct udev_device *find_device(struct udev *udev, struct udev_device *find_device(struct udev *udev,