diff --git a/UBIXFS.PAS b/UBIXFS.PAS index d83b21f..bd4df0d 100755 --- a/UBIXFS.PAS +++ b/UBIXFS.PAS @@ -2838,6 +2838,8 @@ end; // TUbixFS.vfs_fExist function TUbixFS.vfs_format; +const + BATName:array[0..23] of char = 'Block Allocation Tree'#0; var sector:array[0..511] of byte; fs:PUbixFS; @@ -2949,13 +2951,13 @@ uid := 0; gid := 0; mode := 0; - strcopy(name, 'Block Allocation Tree'); flags := INODE_LOGGED; setIAddr(attributes, 0, 0, 0); inodeSize := sb^.inodeSize; - - end; {with} + strcopy(name, 'Block Allocation Tree'); + addAttr('name', BT_PCHAR, @BATName, strlen(@BATName)+1); + end; // with sb^.BAT := inode^.inodeNum; writeln('writing out superblock to sector 1'); device^.write(sb, 1, 1); diff --git a/graphics.pas b/graphics.pas index 1b61913..ec37b08 100755 --- a/graphics.pas +++ b/graphics.pas @@ -208,6 +208,7 @@ procedure displayInodeInfo; var inode:PUbixFSInode; + smallDataNode:PSmallDataNode; begin inode := loadBlock(logicalBlockToIAddr(curIndex)); if (inode = NIL) then exit; @@ -216,7 +217,11 @@ displayY := getHeight()*6; with font^, viewKey[dataMap^[curIndex]], colour[0] do setFGColor(red, green, blue, alpha); - centerTextX(display^, incDisplayY, strPas(name)); + smallDataNode := findAttr('name'); + if smallDataNode <> NIL then + centerTextX(display^, incDisplayY, strPas(smallDataNode^.dataPtr)) + else + centerTextX(display^, incDisplayY, 'Name attr not found!'); font^.setFGColor(255, 255, 255, 255); putString(display^, 0, incDisplayY, 'magic........ ' + hex(magic)); with inodeNum do