From 707aa753f3e2e387b69ea3d01fba63013236e015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 26 Feb 2004 05:03:38 +0000 Subject: [PATCH] Removed DataEditor::SetToAttribute() method. DataEditor::InitCheck() is now properly working for all types. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6747 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/diskprobe/DataEditor.cpp | 22 +++------------------- src/apps/diskprobe/DataEditor.h | 1 - 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/apps/diskprobe/DataEditor.cpp b/src/apps/diskprobe/DataEditor.cpp index 310a21f147..477e6599b0 100644 --- a/src/apps/diskprobe/DataEditor.cpp +++ b/src/apps/diskprobe/DataEditor.cpp @@ -224,8 +224,10 @@ DataEditor::SetTo(BEntry &entry, const char *attribute) if (IsAttribute()) { attr_info info; status = fFile.GetAttrInfo(fAttribute, &info); - if (status != B_OK) + if (status != B_OK) { + fFile.Unset(); return status; + } fSize = info.size; fType = info.type; @@ -263,27 +265,9 @@ DataEditor::SetTo(BEntry &entry, const char *attribute) } -status_t -DataEditor::SetToAttribute(const char *attribute) -{ - status_t status = InitCheck(); - if (status < B_OK) - return status; - - fAttribute = attribute; - - // ToDo: attributes are not yet supported - return B_ERROR; -} - - status_t DataEditor::InitCheck() { - if (fAttribute != NULL) - // ToDo: for now! - return B_ERROR; - return fFile.InitCheck(); } diff --git a/src/apps/diskprobe/DataEditor.h b/src/apps/diskprobe/DataEditor.h index 08f45b9594..bbf67d9e89 100644 --- a/src/apps/diskprobe/DataEditor.h +++ b/src/apps/diskprobe/DataEditor.h @@ -25,7 +25,6 @@ class DataEditor : public BLocker { status_t SetTo(const char *path, const char *attribute = NULL); status_t SetTo(entry_ref &ref, const char *attribute = NULL); status_t SetTo(BEntry &entry, const char *attribute = NULL); - status_t SetToAttribute(const char *attribute); bool IsReadOnly() const { return fIsReadOnly; } bool IsDevice() const { return fIsDevice; }