(devicePath string, partitionNumber int)
| 1880 | } |
| 1881 | |
| 1882 | func (p linux) partitionPath(devicePath string, partitionNumber int) string { |
| 1883 | switch { |
| 1884 | case strings.HasPrefix(devicePath, "/dev/nvme"): |
| 1885 | return fmt.Sprintf("%sp%s", devicePath, strconv.Itoa(partitionNumber)) |
| 1886 | case strings.HasPrefix(devicePath, "/dev/mapper/"): |
| 1887 | return fmt.Sprintf("%s-part%s", devicePath, strconv.Itoa(partitionNumber)) |
| 1888 | default: |
| 1889 | return fmt.Sprintf("%s%s", devicePath, strconv.Itoa(partitionNumber)) |
| 1890 | } |
| 1891 | } |
| 1892 | |
| 1893 | func (p linux) generateDefaultEtcHosts(hostname string) (*bytes.Buffer, error) { |
| 1894 | buffer := bytes.NewBuffer([]byte{}) |
no outgoing calls
no test coverage detected