You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							24 lines
						
					
					
						
							433 B
						
					
					
				
			
		
		
		
			
			
			
		
		
	
	
							24 lines
						
					
					
						
							433 B
						
					
					
				| //go:build solaris | |
| // +build solaris | |
|  | |
| package stats | |
| 
 | |
| import ( | |
| 	"golang.org/x/sys/unix" | |
| 
 | |
| 	"github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb" | |
| ) | |
| 
 | |
| func fillInDiskStatus(disk *volume_server_pb.DiskStatus) { | |
| 	var stat unix.Statvfs_t | |
| 	err := unix.Statvfs(disk.Dir, &stat) | |
| 	if err != nil { | |
| 		return | |
| 	} | |
| 
 | |
| 	disk.All = stat.Blocks * uint64(stat.Bsize) | |
| 	disk.Free = stat.Bfree * uint64(stat.Bsize) | |
| 	calculateDiskRemaining(disk) | |
| 
 | |
| 	return | |
| }
 |