提交 bfefd2cb 编写于 作者: J Ján Tomko

security: use G_GNUC_UNUSED

Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 8b5ef0a6
......@@ -163,7 +163,7 @@ profile_status_file(const char *str)
* load (add) a profile. Will create one if necessary
*/
static int
load_profile(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
load_profile(virSecurityManagerPtr mgr G_GNUC_UNUSED,
const char *profile,
virDomainDefPtr def,
const char *fn,
......@@ -321,28 +321,28 @@ AppArmorSetSecurityHostdevLabelHelper(const char *file, void *opaque)
}
static int
AppArmorSetSecurityUSBLabel(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
AppArmorSetSecurityUSBLabel(virUSBDevicePtr dev G_GNUC_UNUSED,
const char *file, void *opaque)
{
return AppArmorSetSecurityHostdevLabelHelper(file, opaque);
}
static int
AppArmorSetSecurityPCILabel(virPCIDevicePtr dev ATTRIBUTE_UNUSED,
AppArmorSetSecurityPCILabel(virPCIDevicePtr dev G_GNUC_UNUSED,
const char *file, void *opaque)
{
return AppArmorSetSecurityHostdevLabelHelper(file, opaque);
}
static int
AppArmorSetSecuritySCSILabel(virSCSIDevicePtr dev ATTRIBUTE_UNUSED,
AppArmorSetSecuritySCSILabel(virSCSIDevicePtr dev G_GNUC_UNUSED,
const char *file, void *opaque)
{
return AppArmorSetSecurityHostdevLabelHelper(file, opaque);
}
static int
AppArmorSetSecurityHostLabel(virSCSIVHostDevicePtr dev ATTRIBUTE_UNUSED,
AppArmorSetSecurityHostLabel(virSCSIVHostDevicePtr dev G_GNUC_UNUSED,
const char *file, void *opaque)
{
return AppArmorSetSecurityHostdevLabelHelper(file, opaque);
......@@ -350,7 +350,7 @@ AppArmorSetSecurityHostLabel(virSCSIVHostDevicePtr dev ATTRIBUTE_UNUSED,
/* Called on libvirtd startup to see if AppArmor is available */
static int
AppArmorSecurityManagerProbe(const char *virtDriver ATTRIBUTE_UNUSED)
AppArmorSecurityManagerProbe(const char *virtDriver G_GNUC_UNUSED)
{
char *template_qemu = NULL;
char *template_lxc = NULL;
......@@ -391,25 +391,25 @@ AppArmorSecurityManagerProbe(const char *virtDriver ATTRIBUTE_UNUSED)
* currently not used.
*/
static int
AppArmorSecurityManagerOpen(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
AppArmorSecurityManagerOpen(virSecurityManagerPtr mgr G_GNUC_UNUSED)
{
return 0;
}
static int
AppArmorSecurityManagerClose(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
AppArmorSecurityManagerClose(virSecurityManagerPtr mgr G_GNUC_UNUSED)
{
return 0;
}
static const char *
AppArmorSecurityManagerGetModel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
AppArmorSecurityManagerGetModel(virSecurityManagerPtr mgr G_GNUC_UNUSED)
{
return SECURITY_APPARMOR_NAME;
}
static const char *
AppArmorSecurityManagerGetDOI(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
AppArmorSecurityManagerGetDOI(virSecurityManagerPtr mgr G_GNUC_UNUSED)
{
return SECURITY_APPARMOR_VOID_DOI;
}
......@@ -421,7 +421,7 @@ AppArmorSecurityManagerGetDOI(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
* called on shutdown.
*/
static int
AppArmorGenSecurityLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
AppArmorGenSecurityLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def)
{
int rc = -1;
......@@ -488,8 +488,8 @@ static int
AppArmorSetSecurityAllLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def,
const char *stdin_path,
bool chardevStdioLogd ATTRIBUTE_UNUSED,
bool migrated ATTRIBUTE_UNUSED)
bool chardevStdioLogd G_GNUC_UNUSED,
bool migrated G_GNUC_UNUSED)
{
virSecurityLabelDefPtr secdef = virDomainDefGetSecurityLabelDef(def,
SECURITY_APPARMOR_NAME);
......@@ -508,9 +508,9 @@ AppArmorSetSecurityAllLabel(virSecurityManagerPtr mgr,
* running.
*/
static int
AppArmorGetSecurityProcessLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
AppArmorGetSecurityProcessLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def,
pid_t pid ATTRIBUTE_UNUSED,
pid_t pid G_GNUC_UNUSED,
virSecurityLabelPtr sec)
{
int rc = -1;
......@@ -548,7 +548,7 @@ AppArmorGetSecurityProcessLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
* more details. Currently called via qemudShutdownVMDaemon.
*/
static int
AppArmorReleaseSecurityLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
AppArmorReleaseSecurityLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def)
{
virSecurityLabelDefPtr secdef = virDomainDefGetSecurityLabelDef(def,
......@@ -564,10 +564,10 @@ AppArmorReleaseSecurityLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
static int
AppArmorRestoreSecurityAllLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
AppArmorRestoreSecurityAllLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def,
bool migrated ATTRIBUTE_UNUSED,
bool chardevStdioLogd ATTRIBUTE_UNUSED)
bool migrated G_GNUC_UNUSED,
bool chardevStdioLogd G_GNUC_UNUSED)
{
int rc = 0;
virSecurityLabelDefPtr secdef =
......@@ -590,7 +590,7 @@ AppArmorRestoreSecurityAllLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
* LOCALSTATEDIR/log/libvirt/qemu/<vm name>.log
*/
static int
AppArmorSetSecurityProcessLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
AppArmorSetSecurityProcessLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def)
{
int rc = -1;
......@@ -634,7 +634,7 @@ AppArmorSetSecurityProcessLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
* process*.
*/
static int
AppArmorSetSecurityChildProcessLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
AppArmorSetSecurityChildProcessLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def,
virCommandPtr cmd)
{
......@@ -672,22 +672,22 @@ AppArmorSetSecurityChildProcessLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
}
static int
AppArmorSetSecurityDaemonSocketLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr vm ATTRIBUTE_UNUSED)
AppArmorSetSecurityDaemonSocketLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr vm G_GNUC_UNUSED)
{
return 0;
}
static int
AppArmorSetSecuritySocketLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED)
AppArmorSetSecuritySocketLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED)
{
return 0;
}
static int
AppArmorClearSecuritySocketLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED)
AppArmorClearSecuritySocketLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED)
{
return 0;
}
......@@ -698,7 +698,7 @@ static int
AppArmorRestoreSecurityImageLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def,
virStorageSourcePtr src,
virSecurityDomainImageLabelFlags flags ATTRIBUTE_UNUSED)
virSecurityDomainImageLabelFlags flags G_GNUC_UNUSED)
{
if (!virStorageSourceIsLocalStorage(src))
return 0;
......@@ -745,7 +745,7 @@ AppArmorSetMemoryLabel(virSecurityManagerPtr mgr,
static int
AppArmorRestoreMemoryLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def,
virDomainMemoryDefPtr mem ATTRIBUTE_UNUSED)
virDomainMemoryDefPtr mem G_GNUC_UNUSED)
{
return reload_profile(mgr, def, NULL, false);
}
......@@ -790,7 +790,7 @@ AppArmorSetInputLabel(virSecurityManagerPtr mgr,
static int
AppArmorRestoreInputLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def,
virDomainInputDefPtr input ATTRIBUTE_UNUSED)
virDomainInputDefPtr input G_GNUC_UNUSED)
{
return reload_profile(mgr, def, NULL, false);
}
......@@ -800,7 +800,7 @@ static int
AppArmorSetSecurityImageLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def,
virStorageSourcePtr src,
virSecurityDomainImageLabelFlags flags ATTRIBUTE_UNUSED)
virSecurityDomainImageLabelFlags flags G_GNUC_UNUSED)
{
int rc = -1;
char *profile_name = NULL;
......@@ -846,7 +846,7 @@ AppArmorSetSecurityImageLabel(virSecurityManagerPtr mgr,
}
static int
AppArmorSecurityVerify(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
AppArmorSecurityVerify(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def)
{
virSecurityLabelDefPtr secdef =
......@@ -867,9 +867,9 @@ AppArmorSecurityVerify(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
}
static int
AppArmorReserveSecurityLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED,
pid_t pid ATTRIBUTE_UNUSED)
AppArmorReserveSecurityLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED,
pid_t pid G_GNUC_UNUSED)
{
/* NOOP. Nothing to reserve with AppArmor */
return 0;
......@@ -1004,8 +1004,8 @@ AppArmorSetSecurityHostdevLabel(virSecurityManagerPtr mgr,
static int
AppArmorRestoreSecurityHostdevLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def,
virDomainHostdevDefPtr dev ATTRIBUTE_UNUSED,
const char *vroot ATTRIBUTE_UNUSED)
virDomainHostdevDefPtr dev G_GNUC_UNUSED,
const char *vroot G_GNUC_UNUSED)
{
virSecurityLabelDefPtr secdef =
......@@ -1021,7 +1021,7 @@ static int
AppArmorSetChardevLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def,
virDomainChrSourceDefPtr dev_source,
bool chardevStdioLogd ATTRIBUTE_UNUSED)
bool chardevStdioLogd G_GNUC_UNUSED)
{
char *in = NULL, *out = NULL;
int ret = -1;
......@@ -1076,8 +1076,8 @@ AppArmorSetChardevLabel(virSecurityManagerPtr mgr,
static int
AppArmorRestoreChardevLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def,
virDomainChrSourceDefPtr dev_source ATTRIBUTE_UNUSED,
bool chardevStdioLogd ATTRIBUTE_UNUSED)
virDomainChrSourceDefPtr dev_source G_GNUC_UNUSED,
bool chardevStdioLogd G_GNUC_UNUSED)
{
virSecurityLabelDefPtr secdef;
......@@ -1120,7 +1120,7 @@ AppArmorSetPathLabel(virSecurityManagerPtr mgr,
static int
AppArmorRestoreSavedStateLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def,
const char *savefile ATTRIBUTE_UNUSED)
const char *savefile G_GNUC_UNUSED)
{
return reload_profile(mgr, def, NULL, false);
}
......@@ -1153,8 +1153,8 @@ AppArmorSetFDLabel(virSecurityManagerPtr mgr,
}
static char *
AppArmorGetMountOptions(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr vm ATTRIBUTE_UNUSED)
AppArmorGetMountOptions(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr vm G_GNUC_UNUSED)
{
char *opts;
......@@ -1163,8 +1163,8 @@ AppArmorGetMountOptions(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
}
static const char *
AppArmorGetBaseLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
int virtType ATTRIBUTE_UNUSED)
AppArmorGetBaseLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
int virtType G_GNUC_UNUSED)
{
return NULL;
}
......
......@@ -216,7 +216,7 @@ static int virSecurityDACRestoreFileLabelInternal(virSecurityManagerPtr mgr,
* -1 otherwise.
*/
static int
virSecurityDACTransactionRun(pid_t pid ATTRIBUTE_UNUSED,
virSecurityDACTransactionRun(pid_t pid G_GNUC_UNUSED,
void *opaque)
{
virSecurityDACChownListPtr list = opaque;
......@@ -432,7 +432,7 @@ virSecurityDACGetImageIds(virSecurityLabelDefPtr seclabel,
* -1 on failure
*/
static int
virSecurityDACRememberLabel(virSecurityDACDataPtr priv ATTRIBUTE_UNUSED,
virSecurityDACRememberLabel(virSecurityDACDataPtr priv G_GNUC_UNUSED,
const char *path,
uid_t uid,
gid_t gid)
......@@ -466,7 +466,7 @@ virSecurityDACRememberLabel(virSecurityDACDataPtr priv ATTRIBUTE_UNUSED,
* -1 on failure (@uid and @gid not touched)
*/
static int
virSecurityDACRecallLabel(virSecurityDACDataPtr priv ATTRIBUTE_UNUSED,
virSecurityDACRecallLabel(virSecurityDACDataPtr priv G_GNUC_UNUSED,
const char *path,
uid_t *uid,
gid_t *gid)
......@@ -492,13 +492,13 @@ virSecurityDACRecallLabel(virSecurityDACDataPtr priv ATTRIBUTE_UNUSED,
}
static virSecurityDriverStatus
virSecurityDACProbe(const char *virtDriver ATTRIBUTE_UNUSED)
virSecurityDACProbe(const char *virtDriver G_GNUC_UNUSED)
{
return SECURITY_DRIVER_ENABLE;
}
static int
virSecurityDACOpen(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
virSecurityDACOpen(virSecurityManagerPtr mgr G_GNUC_UNUSED)
{
if (virThreadLocalInit(&chownList,
virSecurityDACChownListFree) < 0) {
......@@ -521,13 +521,13 @@ virSecurityDACClose(virSecurityManagerPtr mgr)
static const char *
virSecurityDACGetModel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
virSecurityDACGetModel(virSecurityManagerPtr mgr G_GNUC_UNUSED)
{
return SECURITY_DAC_NAME;
}
static const char *
virSecurityDACGetDOI(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
virSecurityDACGetDOI(virSecurityManagerPtr mgr G_GNUC_UNUSED)
{
return "0";
}
......@@ -609,7 +609,7 @@ virSecurityDACTransactionStart(virSecurityManagerPtr mgr)
* -1 otherwise.
*/
static int
virSecurityDACTransactionCommit(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virSecurityDACTransactionCommit(virSecurityManagerPtr mgr G_GNUC_UNUSED,
pid_t pid,
bool lock)
{
......@@ -659,7 +659,7 @@ virSecurityDACTransactionCommit(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
* Cancels and frees any out standing transaction.
*/
static void
virSecurityDACTransactionAbort(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
virSecurityDACTransactionAbort(virSecurityManagerPtr mgr G_GNUC_UNUSED)
{
virSecurityDACChownListPtr list;
......@@ -1051,7 +1051,7 @@ static int
virSecurityDACRestoreImageLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def,
virStorageSourcePtr src,
virSecurityDomainImageLabelFlags flags ATTRIBUTE_UNUSED)
virSecurityDomainImageLabelFlags flags G_GNUC_UNUSED)
{
return virSecurityDACRestoreImageLabelInt(mgr, def, src, false);
}
......@@ -1065,7 +1065,7 @@ struct virSecurityDACMoveImageMetadataData {
static int
virSecurityDACMoveImageMetadataHelper(pid_t pid ATTRIBUTE_UNUSED,
virSecurityDACMoveImageMetadataHelper(pid_t pid G_GNUC_UNUSED,
void *opaque)
{
struct virSecurityDACMoveImageMetadataData *data = opaque;
......@@ -1137,7 +1137,7 @@ virSecurityDACSetHostdevLabelHelper(const char *file,
static int
virSecurityDACSetPCILabel(virPCIDevicePtr dev ATTRIBUTE_UNUSED,
virSecurityDACSetPCILabel(virPCIDevicePtr dev G_GNUC_UNUSED,
const char *file,
void *opaque)
{
......@@ -1146,7 +1146,7 @@ virSecurityDACSetPCILabel(virPCIDevicePtr dev ATTRIBUTE_UNUSED,
static int
virSecurityDACSetUSBLabel(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
virSecurityDACSetUSBLabel(virUSBDevicePtr dev G_GNUC_UNUSED,
const char *file,
void *opaque)
{
......@@ -1155,7 +1155,7 @@ virSecurityDACSetUSBLabel(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
static int
virSecurityDACSetSCSILabel(virSCSIDevicePtr dev ATTRIBUTE_UNUSED,
virSecurityDACSetSCSILabel(virSCSIDevicePtr dev G_GNUC_UNUSED,
const char *file,
void *opaque)
{
......@@ -1164,7 +1164,7 @@ virSecurityDACSetSCSILabel(virSCSIDevicePtr dev ATTRIBUTE_UNUSED,
static int
virSecurityDACSetHostLabel(virSCSIVHostDevicePtr dev ATTRIBUTE_UNUSED,
virSecurityDACSetHostLabel(virSCSIVHostDevicePtr dev G_GNUC_UNUSED,
const char *file,
void *opaque)
{
......@@ -1305,7 +1305,7 @@ virSecurityDACSetHostdevLabel(virSecurityManagerPtr mgr,
static int
virSecurityDACRestorePCILabel(virPCIDevicePtr dev ATTRIBUTE_UNUSED,
virSecurityDACRestorePCILabel(virPCIDevicePtr dev G_GNUC_UNUSED,
const char *file,
void *opaque)
{
......@@ -1315,7 +1315,7 @@ virSecurityDACRestorePCILabel(virPCIDevicePtr dev ATTRIBUTE_UNUSED,
static int
virSecurityDACRestoreUSBLabel(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
virSecurityDACRestoreUSBLabel(virUSBDevicePtr dev G_GNUC_UNUSED,
const char *file,
void *opaque)
{
......@@ -1325,7 +1325,7 @@ virSecurityDACRestoreUSBLabel(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
static int
virSecurityDACRestoreSCSILabel(virSCSIDevicePtr dev ATTRIBUTE_UNUSED,
virSecurityDACRestoreSCSILabel(virSCSIDevicePtr dev G_GNUC_UNUSED,
const char *file,
void *opaque)
{
......@@ -1335,7 +1335,7 @@ virSecurityDACRestoreSCSILabel(virSCSIDevicePtr dev ATTRIBUTE_UNUSED,
static int
virSecurityDACRestoreHostLabel(virSCSIVHostDevicePtr dev ATTRIBUTE_UNUSED,
virSecurityDACRestoreHostLabel(virSCSIVHostDevicePtr dev G_GNUC_UNUSED,
const char *file,
void *opaque)
{
......@@ -1577,7 +1577,7 @@ virSecurityDACSetChardevLabel(virSecurityManagerPtr mgr,
static int
virSecurityDACRestoreChardevLabelHelper(virSecurityManagerPtr mgr,
virDomainDefPtr def ATTRIBUTE_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED,
virDomainChrSourceDefPtr dev_source,
bool chardevStdioLogd,
bool recall)
......@@ -1671,7 +1671,7 @@ struct _virSecuritySELinuxChardevCallbackData {
static int
virSecurityDACRestoreChardevCallback(virDomainDefPtr def,
virDomainChrDefPtr dev ATTRIBUTE_UNUSED,
virDomainChrDefPtr dev G_GNUC_UNUSED,
void *opaque)
{
struct _virSecuritySELinuxChardevCallbackData *data = opaque;
......@@ -1765,9 +1765,9 @@ virSecurityDACSetGraphicsLabel(virSecurityManagerPtr mgr,
static int
virSecurityDACRestoreGraphicsLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED,
virDomainGraphicsDefPtr gfx ATTRIBUTE_UNUSED)
virSecurityDACRestoreGraphicsLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED,
virDomainGraphicsDefPtr gfx G_GNUC_UNUSED)
{
/* The only graphics labelling we do is dependent on mountNamespaces,
......@@ -1816,7 +1816,7 @@ virSecurityDACSetInputLabel(virSecurityManagerPtr mgr,
static int
virSecurityDACRestoreInputLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def ATTRIBUTE_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED,
virDomainInputDefPtr input)
{
int ret = -1;
......@@ -1840,7 +1840,7 @@ virSecurityDACRestoreInputLabel(virSecurityManagerPtr mgr,
static int
virSecurityDACRestoreMemoryLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def ATTRIBUTE_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED,
virDomainMemoryDefPtr mem)
{
int ret = -1;
......@@ -1862,8 +1862,8 @@ virSecurityDACRestoreMemoryLabel(virSecurityManagerPtr mgr,
static int
virSecurityDACRestoreSEVLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED)
virSecurityDACRestoreSEVLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED)
{
/* we only label /dev/sev when running with namespaces, so we don't need to
* restore anything */
......@@ -1972,7 +1972,7 @@ virSecurityDACRestoreAllLabel(virSecurityManagerPtr mgr,
static int
virSecurityDACSetChardevCallback(virDomainDefPtr def,
virDomainChrDefPtr dev ATTRIBUTE_UNUSED,
virDomainChrDefPtr dev G_GNUC_UNUSED,
void *opaque)
{
struct _virSecuritySELinuxChardevCallbackData *data = opaque;
......@@ -2052,9 +2052,9 @@ virSecurityDACSetSEVLabel(virSecurityManagerPtr mgr,
static int
virSecurityDACSetAllLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def,
const char *stdin_path ATTRIBUTE_UNUSED,
const char *stdin_path G_GNUC_UNUSED,
bool chardevStdioLogd,
bool migrated ATTRIBUTE_UNUSED)
bool migrated G_GNUC_UNUSED)
{
virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr);
virSecurityLabelDefPtr secdef;
......@@ -2182,7 +2182,7 @@ virSecurityDACSetSavedStateLabel(virSecurityManagerPtr mgr,
static int
virSecurityDACRestoreSavedStateLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def ATTRIBUTE_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED,
const char *savefile)
{
virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr);
......@@ -2245,8 +2245,8 @@ virSecurityDACSetChildProcessLabel(virSecurityManagerPtr mgr,
static int
virSecurityDACVerify(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED)
virSecurityDACVerify(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED)
{
return 0;
}
......@@ -2321,16 +2321,16 @@ virSecurityDACGenLabel(virSecurityManagerPtr mgr,
}
static int
virSecurityDACReleaseLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED)
virSecurityDACReleaseLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDACReserveLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED,
pid_t pid ATTRIBUTE_UNUSED)
virSecurityDACReserveLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED,
pid_t pid G_GNUC_UNUSED)
{
return 0;
}
......@@ -2392,8 +2392,8 @@ virSecurityDACGetProcessLabelInternal(pid_t pid,
}
#else
static int
virSecurityDACGetProcessLabelInternal(pid_t pid ATTRIBUTE_UNUSED,
virSecurityLabelPtr seclabel ATTRIBUTE_UNUSED)
virSecurityDACGetProcessLabelInternal(pid_t pid G_GNUC_UNUSED,
virSecurityLabelPtr seclabel G_GNUC_UNUSED)
{
virReportSystemError(ENOSYS, "%s",
_("Cannot get process uid and gid on this platform"));
......@@ -2402,7 +2402,7 @@ virSecurityDACGetProcessLabelInternal(pid_t pid ATTRIBUTE_UNUSED,
#endif
static int
virSecurityDACGetProcessLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virSecurityDACGetProcessLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def,
pid_t pid,
virSecurityLabelPtr seclabel)
......@@ -2427,54 +2427,54 @@ virSecurityDACGetProcessLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
}
static int
virSecurityDACSetDaemonSocketLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr vm ATTRIBUTE_UNUSED)
virSecurityDACSetDaemonSocketLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr vm G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDACSetSocketLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED)
virSecurityDACSetSocketLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDACClearSocketLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED)
virSecurityDACClearSocketLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDACSetImageFDLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED,
int fd ATTRIBUTE_UNUSED)
virSecurityDACSetImageFDLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED,
int fd G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDACSetTapFDLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED,
int fd ATTRIBUTE_UNUSED)
virSecurityDACSetTapFDLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED,
int fd G_GNUC_UNUSED)
{
return 0;
}
static char *
virSecurityDACGetMountOptions(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr vm ATTRIBUTE_UNUSED)
virSecurityDACGetMountOptions(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr vm G_GNUC_UNUSED)
{
return NULL;
}
static const char *
virSecurityDACGetBaseLabel(virSecurityManagerPtr mgr,
int virt ATTRIBUTE_UNUSED)
int virt G_GNUC_UNUSED)
{
virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr);
return priv->baselabel;
......@@ -2484,7 +2484,7 @@ static int
virSecurityDACDomainSetPathLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def,
const char *path,
bool allowSubtree ATTRIBUTE_UNUSED)
bool allowSubtree G_GNUC_UNUSED)
{
virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr);
virSecurityLabelDefPtr seclabel;
......
......@@ -823,7 +823,7 @@ virSecurityManagerCheckChardevLabel(virSecurityManagerPtr mgr,
static int
virSecurityManagerCheckChardevCallback(virDomainDefPtr def ATTRIBUTE_UNUSED,
virSecurityManagerCheckChardevCallback(virDomainDefPtr def G_GNUC_UNUSED,
virDomainChrDefPtr dev,
void *opaque)
{
......@@ -1286,7 +1286,7 @@ cmpstringp(const void *p1, const void *p2)
* NULL on failure.
*/
virSecurityManagerMetadataLockStatePtr
virSecurityManagerMetadataLock(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virSecurityManagerMetadataLock(virSecurityManagerPtr mgr G_GNUC_UNUSED,
const char **paths,
size_t npaths)
{
......@@ -1391,7 +1391,7 @@ virSecurityManagerMetadataLock(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
void
virSecurityManagerMetadataUnlock(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virSecurityManagerMetadataUnlock(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virSecurityManagerMetadataLockStatePtr *state)
{
size_t i;
......
......@@ -26,173 +26,173 @@
#define VIR_FROM_THIS VIR_FROM_SECURITY
static virSecurityDriverStatus
virSecurityDriverProbeNop(const char *virtDriver ATTRIBUTE_UNUSED)
virSecurityDriverProbeNop(const char *virtDriver G_GNUC_UNUSED)
{
return SECURITY_DRIVER_ENABLE;
}
static int
virSecurityDriverOpenNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
virSecurityDriverOpenNop(virSecurityManagerPtr mgr G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDriverCloseNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
virSecurityDriverCloseNop(virSecurityManagerPtr mgr G_GNUC_UNUSED)
{
return 0;
}
static const char *
virSecurityDriverGetModelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
virSecurityDriverGetModelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED)
{
return "none";
}
static const char *
virSecurityDriverGetDOINop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
virSecurityDriverGetDOINop(virSecurityManagerPtr mgr G_GNUC_UNUSED)
{
return "0";
}
static int
virSecurityDomainSetDaemonSocketLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr vm ATTRIBUTE_UNUSED)
virSecurityDomainSetDaemonSocketLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr vm G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainSetSocketLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr vm ATTRIBUTE_UNUSED)
virSecurityDomainSetSocketLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr vm G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainClearSocketLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr vm ATTRIBUTE_UNUSED)
virSecurityDomainClearSocketLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr vm G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainRestoreHostdevLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr vm ATTRIBUTE_UNUSED,
virDomainHostdevDefPtr dev ATTRIBUTE_UNUSED,
const char *vroot ATTRIBUTE_UNUSED)
virSecurityDomainRestoreHostdevLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr vm G_GNUC_UNUSED,
virDomainHostdevDefPtr dev G_GNUC_UNUSED,
const char *vroot G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainSetHostdevLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr vm ATTRIBUTE_UNUSED,
virDomainHostdevDefPtr dev ATTRIBUTE_UNUSED,
const char *vroot ATTRIBUTE_UNUSED)
virSecurityDomainSetHostdevLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr vm G_GNUC_UNUSED,
virDomainHostdevDefPtr dev G_GNUC_UNUSED,
const char *vroot G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainSetSavedStateLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr vm ATTRIBUTE_UNUSED,
const char *savefile ATTRIBUTE_UNUSED)
virSecurityDomainSetSavedStateLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr vm G_GNUC_UNUSED,
const char *savefile G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainRestoreSavedStateLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr vm ATTRIBUTE_UNUSED,
const char *savefile ATTRIBUTE_UNUSED)
virSecurityDomainRestoreSavedStateLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr vm G_GNUC_UNUSED,
const char *savefile G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainGenLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr sec ATTRIBUTE_UNUSED)
virSecurityDomainGenLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr sec G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainReserveLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr sec ATTRIBUTE_UNUSED,
pid_t pid ATTRIBUTE_UNUSED)
virSecurityDomainReserveLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr sec G_GNUC_UNUSED,
pid_t pid G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainReleaseLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr sec ATTRIBUTE_UNUSED)
virSecurityDomainReleaseLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr sec G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainSetAllLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr sec ATTRIBUTE_UNUSED,
const char *stdin_path ATTRIBUTE_UNUSED,
bool chardevStdioLogd ATTRIBUTE_UNUSED,
bool migrated ATTRIBUTE_UNUSED)
virSecurityDomainSetAllLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr sec G_GNUC_UNUSED,
const char *stdin_path G_GNUC_UNUSED,
bool chardevStdioLogd G_GNUC_UNUSED,
bool migrated G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainRestoreAllLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr vm ATTRIBUTE_UNUSED,
bool migrated ATTRIBUTE_UNUSED,
bool chardevStdioLogd ATTRIBUTE_UNUSED)
virSecurityDomainRestoreAllLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr vm G_GNUC_UNUSED,
bool migrated G_GNUC_UNUSED,
bool chardevStdioLogd G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainGetProcessLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr vm ATTRIBUTE_UNUSED,
pid_t pid ATTRIBUTE_UNUSED,
virSecurityLabelPtr sec ATTRIBUTE_UNUSED)
virSecurityDomainGetProcessLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr vm G_GNUC_UNUSED,
pid_t pid G_GNUC_UNUSED,
virSecurityLabelPtr sec G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainSetProcessLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr vm ATTRIBUTE_UNUSED)
virSecurityDomainSetProcessLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr vm G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainSetChildProcessLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr vm ATTRIBUTE_UNUSED,
virCommandPtr cmd ATTRIBUTE_UNUSED)
virSecurityDomainSetChildProcessLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr vm G_GNUC_UNUSED,
virCommandPtr cmd G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainVerifyNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED)
virSecurityDomainVerifyNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainSetFDLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr sec ATTRIBUTE_UNUSED,
int fd ATTRIBUTE_UNUSED)
virSecurityDomainSetFDLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr sec G_GNUC_UNUSED,
int fd G_GNUC_UNUSED)
{
return 0;
}
static char *
virSecurityDomainGetMountOptionsNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr vm ATTRIBUTE_UNUSED)
virSecurityDomainGetMountOptionsNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr vm G_GNUC_UNUSED)
{
char *opts;
......@@ -201,77 +201,77 @@ virSecurityDomainGetMountOptionsNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
}
static const char *
virSecurityGetBaseLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
int virtType ATTRIBUTE_UNUSED)
virSecurityGetBaseLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
int virtType G_GNUC_UNUSED)
{
return NULL;
}
static int
virSecurityDomainRestoreImageLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED,
virStorageSourcePtr src ATTRIBUTE_UNUSED,
virSecurityDomainImageLabelFlags flags ATTRIBUTE_UNUSED)
virSecurityDomainRestoreImageLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED,
virStorageSourcePtr src G_GNUC_UNUSED,
virSecurityDomainImageLabelFlags flags G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainSetImageLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED,
virStorageSourcePtr src ATTRIBUTE_UNUSED,
virSecurityDomainImageLabelFlags flags ATTRIBUTE_UNUSED)
virSecurityDomainSetImageLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED,
virStorageSourcePtr src G_GNUC_UNUSED,
virSecurityDomainImageLabelFlags flags G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainMoveImageMetadataNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
pid_t pid ATTRIBUTE_UNUSED,
virStorageSourcePtr src ATTRIBUTE_UNUSED,
virStorageSourcePtr dst ATTRIBUTE_UNUSED)
virSecurityDomainMoveImageMetadataNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
pid_t pid G_GNUC_UNUSED,
virStorageSourcePtr src G_GNUC_UNUSED,
virStorageSourcePtr dst G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainSetMemoryLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED,
virDomainMemoryDefPtr mem ATTRIBUTE_UNUSED)
virSecurityDomainSetMemoryLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED,
virDomainMemoryDefPtr mem G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainRestoreMemoryLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED,
virDomainMemoryDefPtr mem ATTRIBUTE_UNUSED)
virSecurityDomainRestoreMemoryLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED,
virDomainMemoryDefPtr mem G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainInputLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED,
virDomainInputDefPtr input ATTRIBUTE_UNUSED)
virSecurityDomainInputLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED,
virDomainInputDefPtr input G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainSetChardevLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED,
virDomainChrSourceDefPtr dev_source ATTRIBUTE_UNUSED,
bool chardevStdioLogd ATTRIBUTE_UNUSED)
virSecurityDomainSetChardevLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED,
virDomainChrSourceDefPtr dev_source G_GNUC_UNUSED,
bool chardevStdioLogd G_GNUC_UNUSED)
{
return 0;
}
static int
virSecurityDomainRestoreChardevLabelNop(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED,
virDomainChrSourceDefPtr dev_source ATTRIBUTE_UNUSED,
bool chardevStdioLogd ATTRIBUTE_UNUSED)
virSecurityDomainRestoreChardevLabelNop(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED,
virDomainChrSourceDefPtr dev_source G_GNUC_UNUSED,
bool chardevStdioLogd G_GNUC_UNUSED)
{
return 0;
}
......
......@@ -250,7 +250,7 @@ static int virSecuritySELinuxRestoreFileLabel(virSecurityManagerPtr mgr,
* -1 otherwise.
*/
static int
virSecuritySELinuxTransactionRun(pid_t pid ATTRIBUTE_UNUSED,
virSecuritySELinuxTransactionRun(pid_t pid G_GNUC_UNUSED,
void *opaque)
{
virSecuritySELinuxContextListPtr list = opaque;
......@@ -702,7 +702,7 @@ virSecuritySELinuxLXCInitialize(virSecurityManagerPtr mgr)
}
#else
static int
virSecuritySELinuxLXCInitialize(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
virSecuritySELinuxLXCInitialize(virSecurityManagerPtr mgr G_GNUC_UNUSED)
{
virReportSystemError(ENOSYS, "%s",
_("libselinux does not support LXC contexts path"));
......@@ -1070,13 +1070,13 @@ virSecuritySELinuxDriverClose(virSecurityManagerPtr mgr)
static const char *
virSecuritySELinuxGetModel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
virSecuritySELinuxGetModel(virSecurityManagerPtr mgr G_GNUC_UNUSED)
{
return SECURITY_SELINUX_NAME;
}
static const char *
virSecuritySELinuxGetDOI(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
virSecuritySELinuxGetDOI(virSecurityManagerPtr mgr G_GNUC_UNUSED)
{
/*
* Where will the DOI come from? SELinux configuration, or qemu
......@@ -1149,7 +1149,7 @@ virSecuritySELinuxTransactionStart(virSecurityManagerPtr mgr)
* -1 otherwise.
*/
static int
virSecuritySELinuxTransactionCommit(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virSecuritySELinuxTransactionCommit(virSecurityManagerPtr mgr G_GNUC_UNUSED,
pid_t pid,
bool lock)
{
......@@ -1199,7 +1199,7 @@ virSecuritySELinuxTransactionCommit(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
* Cancels and frees any out standing transaction.
*/
static void
virSecuritySELinuxTransactionAbort(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
virSecuritySELinuxTransactionAbort(virSecurityManagerPtr mgr G_GNUC_UNUSED)
{
virSecuritySELinuxContextListPtr list;
......@@ -1213,8 +1213,8 @@ virSecuritySELinuxTransactionAbort(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
}
static int
virSecuritySELinuxGetProcessLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr def ATTRIBUTE_UNUSED,
virSecuritySELinuxGetProcessLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def G_GNUC_UNUSED,
pid_t pid,
virSecurityLabelPtr sec)
{
......@@ -1462,7 +1462,7 @@ virSecuritySELinuxFSetFilecon(int fd, char *tcon)
/* Set fcon to the appropriate label for path and mode, or return -1. */
static int
getContext(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
getContext(virSecurityManagerPtr mgr G_GNUC_UNUSED,
const char *newpath, mode_t mode, security_context_t *fcon)
{
#if HAVE_SELINUX_LABEL_H
......@@ -1828,7 +1828,7 @@ static int
virSecuritySELinuxRestoreImageLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def,
virStorageSourcePtr src,
virSecurityDomainImageLabelFlags flags ATTRIBUTE_UNUSED)
virSecurityDomainImageLabelFlags flags G_GNUC_UNUSED)
{
return virSecuritySELinuxRestoreImageLabelInt(mgr, def, src, false);
}
......@@ -1966,7 +1966,7 @@ struct virSecuritySELinuxMoveImageMetadataData {
static int
virSecuritySELinuxMoveImageMetadataHelper(pid_t pid ATTRIBUTE_UNUSED,
virSecuritySELinuxMoveImageMetadataHelper(pid_t pid G_GNUC_UNUSED,
void *opaque)
{
struct virSecuritySELinuxMoveImageMetadataData *data = opaque;
......@@ -2029,14 +2029,14 @@ virSecuritySELinuxSetHostdevLabelHelper(const char *file, void *opaque)
}
static int
virSecuritySELinuxSetPCILabel(virPCIDevicePtr dev ATTRIBUTE_UNUSED,
virSecuritySELinuxSetPCILabel(virPCIDevicePtr dev G_GNUC_UNUSED,
const char *file, void *opaque)
{
return virSecuritySELinuxSetHostdevLabelHelper(file, opaque);
}
static int
virSecuritySELinuxSetUSBLabel(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
virSecuritySELinuxSetUSBLabel(virUSBDevicePtr dev G_GNUC_UNUSED,
const char *file, void *opaque)
{
return virSecuritySELinuxSetHostdevLabelHelper(file, opaque);
......@@ -2067,7 +2067,7 @@ virSecuritySELinuxSetSCSILabel(virSCSIDevicePtr dev,
}
static int
virSecuritySELinuxSetHostLabel(virSCSIVHostDevicePtr dev ATTRIBUTE_UNUSED,
virSecuritySELinuxSetHostLabel(virSCSIVHostDevicePtr dev G_GNUC_UNUSED,
const char *file, void *opaque)
{
return virSecuritySELinuxSetHostdevLabelHelper(file, opaque);
......@@ -2272,7 +2272,7 @@ virSecuritySELinuxSetHostdevLabel(virSecurityManagerPtr mgr,
}
static int
virSecuritySELinuxRestorePCILabel(virPCIDevicePtr dev ATTRIBUTE_UNUSED,
virSecuritySELinuxRestorePCILabel(virPCIDevicePtr dev G_GNUC_UNUSED,
const char *file,
void *opaque)
{
......@@ -2282,7 +2282,7 @@ virSecuritySELinuxRestorePCILabel(virPCIDevicePtr dev ATTRIBUTE_UNUSED,
}
static int
virSecuritySELinuxRestoreUSBLabel(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
virSecuritySELinuxRestoreUSBLabel(virUSBDevicePtr dev G_GNUC_UNUSED,
const char *file,
void *opaque)
{
......@@ -2309,7 +2309,7 @@ virSecuritySELinuxRestoreSCSILabel(virSCSIDevicePtr dev,
}
static int
virSecuritySELinuxRestoreHostLabel(virSCSIVHostDevicePtr dev ATTRIBUTE_UNUSED,
virSecuritySELinuxRestoreHostLabel(virSCSIVHostDevicePtr dev G_GNUC_UNUSED,
const char *file,
void *opaque)
{
......@@ -2672,7 +2672,7 @@ struct _virSecuritySELinuxChardevCallbackData {
static int
virSecuritySELinuxRestoreSecurityChardevCallback(virDomainDefPtr def,
virDomainChrDefPtr dev ATTRIBUTE_UNUSED,
virDomainChrDefPtr dev G_GNUC_UNUSED,
void *opaque)
{
struct _virSecuritySELinuxChardevCallbackData *data = opaque;
......@@ -2874,7 +2874,7 @@ virSecuritySELinuxRestoreSavedStateLabel(virSecurityManagerPtr mgr,
static int
virSecuritySELinuxVerify(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virSecuritySELinuxVerify(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def)
{
virSecurityLabelDefPtr secdef;
......@@ -2903,7 +2903,7 @@ virSecuritySELinuxVerify(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
}
static int
virSecuritySELinuxSetProcessLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virSecuritySELinuxSetProcessLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def)
{
/* TODO: verify DOI */
......@@ -2936,7 +2936,7 @@ virSecuritySELinuxSetProcessLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
}
static int
virSecuritySELinuxSetChildProcessLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virSecuritySELinuxSetChildProcessLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def,
virCommandPtr cmd)
{
......@@ -2964,7 +2964,7 @@ virSecuritySELinuxSetChildProcessLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSE
}
static int
virSecuritySELinuxSetDaemonSocketLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virSecuritySELinuxSetDaemonSocketLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def)
{
/* TODO: verify DOI */
......@@ -3014,7 +3014,7 @@ virSecuritySELinuxSetDaemonSocketLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSE
}
static int
virSecuritySELinuxSetSocketLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virSecuritySELinuxSetSocketLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr vm)
{
virSecurityLabelDefPtr secdef;
......@@ -3052,7 +3052,7 @@ virSecuritySELinuxSetSocketLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
}
static int
virSecuritySELinuxClearSocketLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virSecuritySELinuxClearSocketLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def)
{
/* TODO: verify DOI */
......@@ -3085,7 +3085,7 @@ virSecuritySELinuxClearSocketLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
static int
virSecuritySELinuxSetSecurityChardevCallback(virDomainDefPtr def,
virDomainChrDefPtr dev ATTRIBUTE_UNUSED,
virDomainChrDefPtr dev G_GNUC_UNUSED,
void *opaque)
{
struct _virSecuritySELinuxChardevCallbackData *data = opaque;
......@@ -3134,7 +3134,7 @@ virSecuritySELinuxSetAllLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def,
const char *stdin_path,
bool chardevStdioLogd,
bool migrated ATTRIBUTE_UNUSED)
bool migrated G_GNUC_UNUSED)
{
size_t i;
virSecuritySELinuxDataPtr data = virSecurityManagerGetPrivateData(mgr);
......@@ -3236,7 +3236,7 @@ virSecuritySELinuxSetAllLabel(virSecurityManagerPtr mgr,
}
static int
virSecuritySELinuxSetImageFDLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virSecuritySELinuxSetImageFDLabel(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr def,
int fd)
{
......@@ -3380,7 +3380,7 @@ static int
virSecuritySELinuxDomainSetPathLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def,
const char *path,
bool allowSubtree ATTRIBUTE_UNUSED)
bool allowSubtree G_GNUC_UNUSED)
{
virSecurityLabelDefPtr seclabel;
......
......@@ -76,13 +76,13 @@ virSecurityStackGetPrimary(virSecurityManagerPtr mgr)
}
static virSecurityDriverStatus
virSecurityStackProbe(const char *virtDriver ATTRIBUTE_UNUSED)
virSecurityStackProbe(const char *virtDriver G_GNUC_UNUSED)
{
return SECURITY_DRIVER_ENABLE;
}
static int
virSecurityStackOpen(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED)
virSecurityStackOpen(virSecurityManagerPtr mgr G_GNUC_UNUSED)
{
return 0;
}
......@@ -603,8 +603,8 @@ virSecurityStackSetTapFDLabel(virSecurityManagerPtr mgr,
}
static char *
virSecurityStackGetMountOptions(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
virDomainDefPtr vm ATTRIBUTE_UNUSED)
virSecurityStackGetMountOptions(virSecurityManagerPtr mgr G_GNUC_UNUSED,
virDomainDefPtr vm G_GNUC_UNUSED)
{
return NULL;
}
......
......@@ -59,7 +59,7 @@ VIR_LOG_INIT("security.security_util");
#endif
static char *
virSecurityGetAttrName(const char *name ATTRIBUTE_UNUSED)
virSecurityGetAttrName(const char *name G_GNUC_UNUSED)
{
char *ret = NULL;
#ifdef XATTR_NAMESPACE
......@@ -74,7 +74,7 @@ virSecurityGetAttrName(const char *name ATTRIBUTE_UNUSED)
static char *
virSecurityGetRefCountAttrName(const char *name ATTRIBUTE_UNUSED)
virSecurityGetRefCountAttrName(const char *name G_GNUC_UNUSED)
{
char *ret = NULL;
#ifdef XATTR_NAMESPACE
......@@ -98,7 +98,7 @@ virSecurityGetTimestampAttrName(const char *name)
}
#else /* !XATTR_NAMESPACE */
static char *
virSecurityGetTimestampAttrName(const char *name ATTRIBUTE_UNUSED)
virSecurityGetTimestampAttrName(const char *name G_GNUC_UNUSED)
{
errno = ENOSYS;
virReportSystemError(errno, "%s",
......
......@@ -896,7 +896,7 @@ vah_add_file_chardev(virBufferPtr buf,
}
static int
file_iterate_hostdev_cb(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
file_iterate_hostdev_cb(virUSBDevicePtr dev G_GNUC_UNUSED,
const char *file, void *opaque)
{
virBufferPtr buf = opaque;
......@@ -904,7 +904,7 @@ file_iterate_hostdev_cb(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
}
static int
file_iterate_pci_cb(virPCIDevicePtr dev ATTRIBUTE_UNUSED,
file_iterate_pci_cb(virPCIDevicePtr dev G_GNUC_UNUSED,
const char *file, void *opaque)
{
virBufferPtr buf = opaque;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册