diff options
Diffstat (limited to 'raidguessfs.py')
-rwxr-xr-x | raidguessfs.py | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/raidguessfs.py b/raidguessfs.py index 94f36e7..84440c9 100755 --- a/raidguessfs.py +++ b/raidguessfs.py @@ -81,7 +81,7 @@ class RaidGuessFS(fuse.Fuse): self.update_raid_start, self.update_raid_end, self.update_raid_chunk_size, self.update_raid_disk_order, self.raid.set_raid_layout, self.update_bmp_height, self.update_bmp_width, self.update_bmp_start_offset, - self.tasks.task_start, self.tasks.task_kill, self.update_task_find_files_pathlist, + self.tasks.task_start, self.tasks.task_kill, self.tasks.append_find_files_pathlist ] @@ -203,19 +203,6 @@ class RaidGuessFS(fuse.Fuse): self._refresh_raid_fattr() logging.debug("Exit. update_raid_disk_order(%s)"%arg) - def update_task_find_files_pathlist(self, arg): - logging.debug("Enter update_task_find_files_pathlist(%s)"%arg) - if type(arg) is str: - l = arg.split() - elif type(arg) is list: - l = arg - else: - raise TypeError('update_task_find_files_pathlist() wants a list or str') - - # FIXME : write() is usually called after each end line, so the previous path are destroyed - self.tasks.set_find_files_pathlist(l) - logging.debug("Exit. update_task_find_files_pathlist(%s)"%arg) - def get_task_start(self): return 'Write a task_name in this pseudo-file to start it\n' @@ -278,8 +265,11 @@ class RaidGuessFS(fuse.Fuse): def truncate(self, path, size): logging.info("truncate: %s (size %s)" % (path, size)) - if path.startswith('/config/'): - return # Ignore truncates on pseudo config files + + if path == '/config/task_find_files_pathlist': + self.tasks.set_find_files_pathlist([]) + elif path.startswith('/config/'): + return # Ignore truncates on others pseudo config files else: return -errno.EOPNOTSUPP |