From 636ccbf306bce8e3b28b12bb7174bdc1f579d100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 22 Apr 2009 15:58:29 +0000 Subject: [PATCH] * Write the identifier as attribute to the file to make later checks possible. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30330 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../system/random_file_actions/random_file_actions.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tests/system/random_file_actions/random_file_actions.cpp b/src/tests/system/random_file_actions/random_file_actions.cpp index a4574b2180..d0eb492a95 100644 --- a/src/tests/system/random_file_actions/random_file_actions.cpp +++ b/src/tests/system/random_file_actions/random_file_actions.cpp @@ -18,7 +18,9 @@ #include #include +#include #include +#include enum file_action { @@ -50,6 +52,7 @@ typedef std::vector EntryVector; const char* kDefaultBaseDir = "./random_file_temp"; +const char* kIdentifierAttribute = "rfa:identifier"; const uint32 kDefaultDirCount = 1; const uint32 kDefaultFileCount = 10; @@ -539,6 +542,9 @@ create_file(const EntryVector& dirs, EntryVector& files) files.push_back(file); + fs_write_attr(fd, kIdentifierAttribute, B_UINT32_TYPE, 0, &file.identifier, + sizeof(uint32)); + close(fd); }