Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2712584pxb; Sun, 28 Feb 2021 10:26:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwTj/w9QptD5a3AHSRhUm3DQOsHYmptWEBKJrs5/czpVEP5KAX+EyZZX5vkAVUuHTi+5pr9 X-Received: by 2002:a17:906:9888:: with SMTP id zc8mr12815909ejb.310.1614536796563; Sun, 28 Feb 2021 10:26:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614536796; cv=none; d=google.com; s=arc-20160816; b=HwZHIEVxjQhVqaMhM8b+0QfmTC9NeSFVAOgAn13rQYv4qBof9JtlPb1r92tdZAXBkh jxYvqPZvvhjoOt1ZP9kLCWGM9UQQA8A9khscQiUFIYMcWHqmjYHmxIEVIf+hWTcC0KH3 bpR+bPvn0Jabo6hE12V1YXbaJaTsZclHgPvfcN0fpzL45+jlWrt6CaYRz6YiAFKPtHXu OaU7zXosAsAkIWID21jc/Gm6oipTQEI9pkkQJXW6B5/wAK+F6egpSE4K3D25r/uiizil 0UuFJ0qkvRipnb9xHox+q4ikmoPN4uWnIRGjEHWKFfoCES225b25YzHqFRR1SoI9AGJm NkRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CRBQ3jHUDLveOi1cHYKrTjafEL9eOBQAA47NGR6XM7Q=; b=fWqHEblOC9yk/y7cM3G/xRv4YNg3lSN6l9IbPBntfO2XMh3YFuEmfW+0tJZbOIPWmi EZCQ48vsHn+RTs8NsHKnaGr8GtGLJmaOcNsLDswG5klCHwMDSeAWAbY/+eYwAf9sIOHf J3JTAUEqyl5bl5Q2PlDwOX/vbuaDW8Z0xLntzHfZVNMDzI/jnXSY6zAmMYgedSe7TmFD tUbXy+9jY8nST7WgYVIkicBR+XKOrNwstHodZCaPM0FlPwm5JvWK99uM6E6iSE63S4DP FYhdebShdYL5RINGo5UB2uLrL4dJXYnQSMdt5vd50RNi1UBF2UEBbXjwkJUNRTsjBrhS mvag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dGUempTj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a21si5183545ejr.620.2021.02.28.10.26.14; Sun, 28 Feb 2021 10:26:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dGUempTj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231138AbhB1RFJ (ORCPT + 99 others); Sun, 28 Feb 2021 12:05:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230412AbhB1RFH (ORCPT ); Sun, 28 Feb 2021 12:05:07 -0500 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C72BBC061756; Sun, 28 Feb 2021 09:04:26 -0800 (PST) Received: by mail-ej1-x634.google.com with SMTP id k13so23796505ejs.10; Sun, 28 Feb 2021 09:04:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=CRBQ3jHUDLveOi1cHYKrTjafEL9eOBQAA47NGR6XM7Q=; b=dGUempTjXA5VIO5nANVB/AOn0x4Pqpzw1Gm/qVGUGDLQm+XdteIuomBnIpeim2iqq5 jeEadEcMtLzbppYwAGJuOlrTFouXcg2/XikXjbFRxa2h521/UKD5oGlfzE29fZQRD6G2 aAfRzHn1rbUDZZJmWd0dBVAug8ZJGS3Ee1/Kmp/9s/nEjiFJWTQ7K9P6pKbH1MVcbAY8 l0ixlpgjVetHJM7fOZo6j0yGk26rmECs/HNzgWvYuhj1NNeCce3iRf/aijwSdCNYyB8v Kxr9KcDUp3iPhrLWxU1iK4evzvRdAf74QNF89Ny7e9B+3Zwt+9YVDHI7W9nOwrcYwF0J /cqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=CRBQ3jHUDLveOi1cHYKrTjafEL9eOBQAA47NGR6XM7Q=; b=deAZfR9PYPHu+cKOZpq0WEh2deWoy/D35DtqBQoY5tQTSG82WqhaYwxyV8DPnISOaf kE4SNp97Hn+rKeFebyNUDE0S3nmTv3Kske6u9+nTqvsmJKeIrCPtPz5zMhybtUkm+YoM x9IQOsUrFp/pP2WX69giNYKdqg5iHImlX0/d9PyDYOF+KO40q5C/x2vUJbWwPVYhXL4R 6J6yLIhYlzZeCdTDTndM275QS8dXBLN/dw9dqXbY2bjD7XkbU4QJ/JjnRbor0ITZZZQb CYEUkFLJgqZt0OSSL/Eh5pdABMsYUOXkqY9QI3oAS2g1FnjikkHQehr0X8Olu3xAdwck gP8w== X-Gm-Message-State: AOAM530SG3Xnh2ofxVp79djph0ZAKSWUQWygKqyjT04lmlLlDdqqQAXX rpgYeYs4DLhlgNYufmam9g== X-Received: by 2002:a17:906:4f96:: with SMTP id o22mr12001318eju.511.1614531865649; Sun, 28 Feb 2021 09:04:25 -0800 (PST) Received: from localhost.localdomain ([46.53.249.223]) by smtp.gmail.com with ESMTPSA id bx2sm9443432edb.80.2021.02.28.09.04.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Feb 2021 09:04:25 -0800 (PST) Date: Sun, 28 Feb 2021 20:04:23 +0300 From: Alexey Dobriyan To: torvalds@linux-foundation.org Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, paul@paul-moore.com, stephen.smalley.work@gmail.com, eparis@parisplace.org, selinux@vger.kernel.org Subject: [PATCH 09/11] pragma once: convert scripts/selinux/genheaders/genheaders.c Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From 097f2c8b2af7d9e88cff59376ea0ad51b95341cb Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Tue, 9 Feb 2021 00:39:23 +0300 Subject: [PATCH 09/11] pragma once: convert scripts/selinux/genheaders/genheaders.c Generate security/selinux/flask.h and security/selinux/av_permissions.h without include guards. Signed-off-by: Alexey Dobriyan --- scripts/selinux/genheaders/genheaders.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/selinux/genheaders/genheaders.c b/scripts/selinux/genheaders/genheaders.c index f355b3e0e968..e13ee4221993 100644 --- a/scripts/selinux/genheaders/genheaders.c +++ b/scripts/selinux/genheaders/genheaders.c @@ -74,8 +74,8 @@ int main(int argc, char *argv[]) initial_sid_to_string[i] = stoupperx(s); } + fprintf(fout, "#pragma once\n"); fprintf(fout, "/* This file is automatically generated. Do not edit. */\n"); - fprintf(fout, "#ifndef _SELINUX_FLASK_H_\n#define _SELINUX_FLASK_H_\n\n"); for (i = 0; secclass_map[i].name; i++) { struct security_class_mapping *map = &secclass_map[i]; @@ -109,7 +109,6 @@ int main(int argc, char *argv[]) fprintf(fout, "\treturn sock;\n"); fprintf(fout, "}\n"); - fprintf(fout, "\n#endif\n"); fclose(fout); fout = fopen(argv[2], "w"); @@ -119,8 +118,8 @@ int main(int argc, char *argv[]) exit(4); } + fprintf(fout, "#pragma once\n"); fprintf(fout, "/* This file is automatically generated. Do not edit. */\n"); - fprintf(fout, "#ifndef _SELINUX_AV_PERMISSIONS_H_\n#define _SELINUX_AV_PERMISSIONS_H_\n\n"); for (i = 0; secclass_map[i].name; i++) { struct security_class_mapping *map = &secclass_map[i]; @@ -136,7 +135,6 @@ int main(int argc, char *argv[]) } } - fprintf(fout, "\n#endif\n"); fclose(fout); exit(0); } -- 2.29.2