Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 08481c5

Browse files
committed
drop hyper_mount_blockdev
Signed-off-by: Peng Tao <bergwolf@gmail.com>
1 parent 6dd63a0 commit 08481c5

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

src/util.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -912,21 +912,3 @@ int hyper_eventfd_send(int fd, int64_t type)
912912

913913
return 0;
914914
}
915-
916-
/* block device might not be present when we call mount. Sleep a bit in such case */
917-
int hyper_mount_blockdev(const char *dev, const char *root, const char *fstype, const char *options)
918-
{
919-
int i, retry = 5;
920-
921-
for (i = 0; i < retry; i++) {
922-
if (mount(dev, root, fstype, 0, options) < 0) {
923-
if (errno != ENOENT)
924-
return -1;
925-
usleep(20000);
926-
continue;
927-
}
928-
return 0;
929-
}
930-
931-
return -1;
932-
}

src/util.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,4 @@ ssize_t nonblock_read(int fd, void *buf, size_t count);
5050
int hyper_mount_nfs(char *server, char *mountpoint);
5151
int64_t hyper_eventfd_recv(int fd);
5252
int hyper_eventfd_send(int fd, int64_t type);
53-
int hyper_mount_blockdev(const char *dev, const char *root, const char *fstype, const char *options);
5453
#endif

0 commit comments

Comments
 (0)