Skip to content

Commit

Permalink
check cast
Browse files Browse the repository at this point in the history
update status README.md
  • Loading branch information
archie2x committed Jul 27, 2024
1 parent 1d8f54a commit 52db5cd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
12 changes: 11 additions & 1 deletion cmds/core/df/dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,24 @@
package main

import (
"fmt"
"os"
"syscall"
)

func deviceNumber(path string) (uint64, error) {

// stat()
fi, err := os.Stat(path)
if err != nil {
return 0, err
}
return fi.Sys().(*syscall.Stat_t).Dev, nil

// retrieve device number
st, ok := fi.Sys().(*syscall.Stat_t)
if !ok {
return 0, fmt.Errorf("stat %v: error retrieving devno", path)
}

return st.Dev, nil
}
8 changes: 4 additions & 4 deletions tools/tinygobb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ The neccessary additions to tinygo will be tracked in the according issue that t

## command list
### core
41 tinygo build errors found.
40 tinygo build errors found.

- [ ] `bind`
- [ ] `df`
- [ ] `dhclient`
- [ ] `dmesg`
- [ ] `fusermount`
Expand Down Expand Up @@ -55,7 +55,7 @@ The neccessary additions to tinygo will be tracked in the according issue that t
- [ ] `which`
- [ ] `nohup`

64 cmds build successful
65 cmds build successful
- [x] `backoff`
- [x] `base64`
- [x] `basename`
Expand All @@ -69,6 +69,7 @@ The neccessary additions to tinygo will be tracked in the according issue that t
- [x] `cpio`
- [x] `date`
- [x] `dd`
- [x] `df`
- [x] `dirname`
- [x] `echo`
- [x] `false`
Expand Down Expand Up @@ -182,4 +183,3 @@ The neccessary additions to tinygo will be tracked in the according issue that t
- [x] `watch`
- [x] `zbi`
- [x] `zimage`

0 comments on commit 52db5cd

Please sign in to comment.