Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37910308
en ru br
ALT Linux repositórios
S:1.0.8-alt4

Group :: Sistema/Kernel e hardware
RPM: bcache-tools

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: bcache-status-rootgc.patch
Download


--- bcache-tools-1.0.8.bcache-status.orig	2016-08-04 15:03:50.095602401 +0200
+++ bcache-tools-1.0.8/bcache-status	2016-08-04 14:31:24.507542579 +0200
@@ -337,8 +337,12 @@
 			continue
 
 		if run_gc:
-			with open('%s%s/internal/trigger_gc' % (SYSFS_BCACHE_PATH, cache), 'w') as fd:
-				fd.write('1\n')
+			try:
+				with open('%s%s/internal/trigger_gc' % (SYSFS_BCACHE_PATH, cache), 'w') as fd:
+					fd.write('1\n')
+			except PermissionError as e:
+				print ('You need root permissions for the --gc option')
+				sys.exit(1)
 
 		dump_bcache('%s%s' % (SYSFS_BCACHE_PATH, cache), stats, print_subdevices, uuid_map.get(cache, '?'))
 
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009