Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
f264ae67
Commit
f264ae67
authored
Sep 23, 2015
by
Eric Tune
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14201 from swagiaal/fix-format-and-mount-comment
Correct comments in mount.go
parents
1311f44b
3e958799
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mount.go
pkg/util/mount/mount.go
+2
-2
No files found.
pkg/util/mount/mount.go
View file @
f264ae67
...
@@ -75,7 +75,7 @@ func (mounter *SafeFormatAndMount) formatAndMount(source string, target string,
...
@@ -75,7 +75,7 @@ func (mounter *SafeFormatAndMount) formatAndMount(source string, target string,
// Try to mount the disk
// Try to mount the disk
err
:=
mounter
.
Interface
.
Mount
(
source
,
target
,
fstype
,
options
)
err
:=
mounter
.
Interface
.
Mount
(
source
,
target
,
fstype
,
options
)
if
err
!=
nil
{
if
err
!=
nil
{
// It is possible that this disk is not formatted. Double check using
'file'
// It is possible that this disk is not formatted. Double check using
diskLooksUnformatted
notFormatted
,
err
:=
mounter
.
diskLooksUnformatted
(
source
)
notFormatted
,
err
:=
mounter
.
diskLooksUnformatted
(
source
)
if
err
==
nil
&&
notFormatted
{
if
err
==
nil
&&
notFormatted
{
// Disk is unformatted so format it.
// Disk is unformatted so format it.
...
@@ -96,7 +96,7 @@ func (mounter *SafeFormatAndMount) formatAndMount(source string, target string,
...
@@ -96,7 +96,7 @@ func (mounter *SafeFormatAndMount) formatAndMount(source string, target string,
return
err
return
err
}
}
// diskLooksUnformatted uses '
file
' to see if the given disk is unformated
// diskLooksUnformatted uses '
lsblk
' to see if the given disk is unformated
func
(
mounter
*
SafeFormatAndMount
)
diskLooksUnformatted
(
disk
string
)
(
bool
,
error
)
{
func
(
mounter
*
SafeFormatAndMount
)
diskLooksUnformatted
(
disk
string
)
(
bool
,
error
)
{
args
:=
[]
string
{
"-nd"
,
"-o"
,
"FSTYPE"
,
disk
}
args
:=
[]
string
{
"-nd"
,
"-o"
,
"FSTYPE"
,
disk
}
cmd
:=
mounter
.
Runner
.
Command
(
"lsblk"
,
args
...
)
cmd
:=
mounter
.
Runner
.
Command
(
"lsblk"
,
args
...
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment