mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 07:31:41 +00:00
Merge branch 'tmp'
This commit is contained in:
commit
8dd2e3bd57
6 changed files with 212 additions and 93 deletions
|
@ -313,4 +313,16 @@ static inline int ata_ok(u8 status)
|
|||
== ATA_DRDY);
|
||||
}
|
||||
|
||||
static inline int lba_28_ok(u64 block, u32 n_block)
|
||||
{
|
||||
/* check the ending block number */
|
||||
return ((block + n_block - 1) < ((u64)1 << 28)) && (n_block <= 256);
|
||||
}
|
||||
|
||||
static inline int lba_48_ok(u64 block, u32 n_block)
|
||||
{
|
||||
/* check the ending block number */
|
||||
return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= 65536);
|
||||
}
|
||||
|
||||
#endif /* __LINUX_ATA_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue