Some minor style changes/clean ups.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3328 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
18a8d114f5
commit
09ed3db89a
@ -255,14 +255,14 @@ class Inode : public CachedBlock {
|
|||||||
|
|
||||||
class Vnode {
|
class Vnode {
|
||||||
public:
|
public:
|
||||||
Vnode(Volume *volume,vnode_id id)
|
Vnode(Volume *volume, vnode_id id)
|
||||||
:
|
:
|
||||||
fVolume(volume),
|
fVolume(volume),
|
||||||
fID(id)
|
fID(id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Vnode(Volume *volume,block_run run)
|
Vnode(Volume *volume, block_run run)
|
||||||
:
|
:
|
||||||
fVolume(volume),
|
fVolume(volume),
|
||||||
fID(volume->ToVnode(run))
|
fID(volume->ToVnode(run))
|
||||||
@ -277,13 +277,13 @@ class Vnode {
|
|||||||
status_t Get(Inode **inode)
|
status_t Get(Inode **inode)
|
||||||
{
|
{
|
||||||
// should we check inode against NULL here? it should not be necessary
|
// should we check inode against NULL here? it should not be necessary
|
||||||
return get_vnode(fVolume->ID(),fID,(void **)inode);
|
return get_vnode(fVolume->ID(), fID, (void **)inode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Put()
|
void Put()
|
||||||
{
|
{
|
||||||
if (fVolume)
|
if (fVolume)
|
||||||
put_vnode(fVolume->ID(),fID);
|
put_vnode(fVolume->ID(), fID);
|
||||||
fVolume = NULL;
|
fVolume = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -304,7 +304,7 @@ class AttributeIterator {
|
|||||||
~AttributeIterator();
|
~AttributeIterator();
|
||||||
|
|
||||||
status_t Rewind();
|
status_t Rewind();
|
||||||
status_t GetNext(char *name,size_t *length,uint32 *type,vnode_id *id);
|
status_t GetNext(char *name, size_t *length, uint32 *type, vnode_id *id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int32 fCurrentSmallData;
|
int32 fCurrentSmallData;
|
||||||
@ -316,7 +316,7 @@ class AttributeIterator {
|
|||||||
friend Chain<AttributeIterator>;
|
friend Chain<AttributeIterator>;
|
||||||
friend Inode;
|
friend Inode;
|
||||||
|
|
||||||
void Update(uint16 index,int8 change);
|
void Update(uint16 index, int8 change);
|
||||||
AttributeIterator *fNext;
|
AttributeIterator *fNext;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -326,7 +326,8 @@ class AttributeIterator {
|
|||||||
* file, it will be converted to R_OK.
|
* file, it will be converted to R_OK.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
inline int oModeToAccess(int omode)
|
inline int
|
||||||
|
oModeToAccess(int omode)
|
||||||
{
|
{
|
||||||
omode &= O_RWMASK;
|
omode &= O_RWMASK;
|
||||||
if (omode == O_RDONLY)
|
if (omode == O_RDONLY)
|
||||||
|
@ -1547,10 +1547,11 @@ Query::LiveUpdate(Inode *inode, const char *attribute, int32 type, const uint8 *
|
|||||||
|
|
||||||
status_t oldStatus = fExpression->Root()->Match(inode, attribute, type, oldKey, oldLength);
|
status_t oldStatus = fExpression->Root()->Match(inode, attribute, type, oldKey, oldLength);
|
||||||
status_t newStatus = fExpression->Root()->Match(inode, attribute, type, newKey, newLength);
|
status_t newStatus = fExpression->Root()->Match(inode, attribute, type, newKey, newLength);
|
||||||
|
|
||||||
int32 op;
|
int32 op;
|
||||||
if (oldStatus == MATCH_OK && newStatus == MATCH_OK) {
|
if (oldStatus == MATCH_OK && newStatus == MATCH_OK) {
|
||||||
// only send out a notification if the name was changed
|
// only send out a notification if the name was changed
|
||||||
if (oldKey == NULL || strcmp(attribute,"name"))
|
if (oldKey == NULL || strcmp(attribute, "name"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
send_notification(fPort, fToken, B_QUERY_UPDATE, B_ENTRY_REMOVED, fVolume->ID(), 0,
|
send_notification(fPort, fToken, B_QUERY_UPDATE, B_ENTRY_REMOVED, fVolume->ID(), 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user