Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| SHA1 Hash: | 0a2c4ac0ef46116fc90566f03b1219d6b9ac2c2a |
|---|---|
| Date: | 2010-03-10 21:07:05 |
| User: | stephan |
| Comment: | non-functional cleanups only. |
Tags And Properties
- branch=trunk inherited from [c3e484d316]
- sym-trunk inherited from [c3e484d316]
Changes
Changes to pfs/pfs.c
| Old (4cc13ad50e092b5c) | New (aa92517667fb8b2d) | |||
|---|---|---|---|---|
| 1 | /************************************************************************ | 1 | /************************************************************************ | |
| 2 | This is a work-in-progress, porting over parts of the whefs API into | 2 | This is a work-in-progress, porting over parts of the whefs API into | |
| 3 | the whio API... | 3 | the whio API... | |
| 4 | 4 | |||
| 5 | Author: Stephan Beal (http://wanderinghorse.net/home/stephan/) | 5 | Author: Stephan Beal (http://wanderinghorse.net/home/stephan/) | |
| 504 hidden lines | ||||
| 510 | { | 510 | { | |
| 511 | return whio_rc.ArgError; | 511 | return whio_rc.ArgError; | |
| 512 | } | 512 | } | |
| 513 | enum { Len = whio_epfs_sizeof_label }; | 513 | enum { Len = whio_epfs_sizeof_label }; | |
| 514 | unsigned char buf[Len]; | 514 | unsigned char buf[Len]; | |
| 515 | //memset(buf, 0, Len); | | | 515 | memset( buf, 0, Len ); |
| 516 | memset( buf, 0, whio_epfs_sizeof_label ); | | | ||
| 517 | if( (Len != whio_epfs_readat(fs, fs->offsets[whio_epfs_index_label], | 516 | if( (Len != whio_epfs_readat(fs, fs->offsets[whio_epfs_index_label], | |
| 518 | buf, (whio_size_t)Len ) ) ) | 517 | buf, (whio_size_t)Len ) ) ) | |
| 519 | { | 518 | { | |
| 520 | return whio_rc.IOError; | 519 | return whio_rc.IOError; | |
| 521 | } | 520 | } | |
| 522 | if( *buf != whio_epfs_label_tag_char ) | 521 | if( *buf != whio_epfs_label_tag_char ) | |
| 523 | { | 522 | { | |
| 524 | return whio_rc.ConsistencyError; | 523 | return whio_rc.ConsistencyError; | |
| 525 | } | 524 | } | |
| 526 | memcpy( tgt, buf+1, whio_epfs_sizeof_label_payload ); | | | 525 | memcpy( tgt, buf+1/*tag byte*/, whio_epfs_sizeof_label_payload ); |
| 527 | return whio_rc.OK; | 526 | return whio_rc.OK; | |
| 528 | } | 527 | } | |
| 529 | 528 | |||
| 530 | int whio_epfs_label_get( whio_epfs * fs, char * lbl ) | 529 | int whio_epfs_label_get( whio_epfs * fs, char * lbl ) | |
| 531 | { | 530 | { | |
| 614 hidden lines | ||||
| 1146 | return rc; | 1145 | return rc; | |
| 1147 | } | 1146 | } | |
| 1148 | 1147 | |||
| 1149 | 1148 | |||
| 1150 | #undef MARKER | 1149 | #undef MARKER | |