提交 15941b2b 编写于 作者: R Ryota Ozaki 提交者: Daniel Veillard

LXC fix wrong or out-of-date function descriptions

* src/lxc/lxc_container.c src/lxc/lxc_controller.c src/lxc/lxc_driver.c
  src/lxc/veth.c: fix broken function comments
上级 45bd290b
...@@ -91,7 +91,7 @@ struct __lxc_child_argv { ...@@ -91,7 +91,7 @@ struct __lxc_child_argv {
/** /**
* lxcContainerExecInit: * lxcContainerExecInit:
* @vmDef: Ptr to vm definition structure * @vmDef: pointer to vm definition structure
* *
* Exec the container init string. The container init will replace then * Exec the container init string. The container init will replace then
* be running in the current process * be running in the current process
...@@ -110,8 +110,8 @@ static int lxcContainerExecInit(virDomainDefPtr vmDef) ...@@ -110,8 +110,8 @@ static int lxcContainerExecInit(virDomainDefPtr vmDef)
/** /**
* lxcContainerSetStdio: * lxcContainerSetStdio:
* @control: the conrol FD * @control: control FD from parent
* @ttyPath: Name of tty to set as the container console * @ttyfd: FD of tty to set as the container console
* *
* Sets the given tty as the primary conosole for the container as well as * Sets the given tty as the primary conosole for the container as well as
* stdout, stdin and stderr. * stdout, stdin and stderr.
...@@ -168,7 +168,7 @@ cleanup: ...@@ -168,7 +168,7 @@ cleanup:
/** /**
* lxcContainerSendContinue: * lxcContainerSendContinue:
* @monitor: control FD to child * @control: control FD to child
* *
* Sends the continue message via the socket pair stored in the vm * Sends the continue message via the socket pair stored in the vm
* structure. * structure.
...@@ -196,7 +196,7 @@ error_out: ...@@ -196,7 +196,7 @@ error_out:
/** /**
* lxcContainerWaitForContinue: * lxcContainerWaitForContinue:
* @control: control FD from parent * @control: Control FD from parent
* *
* This function will wait for the container continue message from the * This function will wait for the container continue message from the
* parent process. It will send this message on the socket pair stored in * parent process. It will send this message on the socket pair stored in
...@@ -225,8 +225,9 @@ static int lxcContainerWaitForContinue(int control) ...@@ -225,8 +225,9 @@ static int lxcContainerWaitForContinue(int control)
/** /**
* lxcEnableInterfaces: * lxcContainerEnableInterfaces:
* @vm: Pointer to vm structure * @nveths: number of interfaces
* @veths: interface names
* *
* This function will enable the interfaces for this container. * This function will enable the interfaces for this container.
* *
...@@ -696,8 +697,8 @@ static int lxcContainerDropCapabilities(void) ...@@ -696,8 +697,8 @@ static int lxcContainerDropCapabilities(void)
/** /**
* lxcChild: * lxcContainerChild:
* @argv: Pointer to container arguments * @data: pointer to container arguments
* *
* This function is run in the process clone()'d in lxcStartContainer. * This function is run in the process clone()'d in lxcStartContainer.
* Perform a number of container setup tasks: * Perform a number of container setup tasks:
...@@ -776,8 +777,11 @@ static int userns_supported(void) ...@@ -776,8 +777,11 @@ static int userns_supported(void)
/** /**
* lxcContainerStart: * lxcContainerStart:
* @driver: pointer to driver structure * @def: pointer to virtual machine structure
* @vm: pointer to virtual machine structure * @nveths: number of interfaces
* @veths: interface names
* @control: control FD to the container
* @ttyPath: path of tty to set as the container console
* *
* Starts a container process by calling clone() with the namespace flags * Starts a container process by calling clone() with the namespace flags
* *
......
...@@ -269,9 +269,11 @@ typedef struct _lxcTtyForwardFd_t { ...@@ -269,9 +269,11 @@ typedef struct _lxcTtyForwardFd_t {
} lxcTtyForwardFd_t; } lxcTtyForwardFd_t;
/** /**
* lxcTtyForward: * lxcControllerMain
* @appPty: Open fd for application facing Pty * @monitor: server socket fd to accept client requests
* @contPty: Open fd for container facing Pty * @client: initial client which is the libvirtd daemon
* @appPty: open fd for application facing Pty
* @contPty: open fd for container facing Pty
* *
* Forwards traffic between fds. Data read from appPty will be written to contPty * Forwards traffic between fds. Data read from appPty will be written to contPty
* This process loops forever. * This process loops forever.
...@@ -461,8 +463,8 @@ static int lxcControllerMoveInterfaces(unsigned int nveths, ...@@ -461,8 +463,8 @@ static int lxcControllerMoveInterfaces(unsigned int nveths,
/** /**
* lxcCleanupInterfaces: * lxcCleanupInterfaces:
* @conn: pointer to connection * @nveths: number of interfaces
* @vm: pointer to virtual machine structure * @veths: interface names
* *
* Cleans up the container interfaces by deleting the veth device pairs. * Cleans up the container interfaces by deleting the veth device pairs.
* *
......
...@@ -614,7 +614,9 @@ cleanup: ...@@ -614,7 +614,9 @@ cleanup:
/** /**
* lxcVmCleanup: * lxcVmCleanup:
* @vm: Ptr to VM to clean up * @conn: pointer to connection
* @driver: pointer to driver structure
* @vm: pointer to VM to clean up
* *
* waitpid() on the container process. kill and wait the tty process * waitpid() on the container process. kill and wait the tty process
* This is called by both lxcDomainDestroy and lxcSigHandler when a * This is called by both lxcDomainDestroy and lxcSigHandler when a
...@@ -622,7 +624,7 @@ cleanup: ...@@ -622,7 +624,7 @@ cleanup:
* *
* Returns 0 on success or -1 in case of error * Returns 0 on success or -1 in case of error
*/ */
static int lxcVMCleanup(virConnectPtr conn, static int lxcVmCleanup(virConnectPtr conn,
lxc_driver_t *driver, lxc_driver_t *driver,
virDomainObjPtr vm) virDomainObjPtr vm)
{ {
...@@ -683,7 +685,10 @@ static int lxcVMCleanup(virConnectPtr conn, ...@@ -683,7 +685,10 @@ static int lxcVMCleanup(virConnectPtr conn,
/** /**
* lxcSetupInterfaces: * lxcSetupInterfaces:
* @conn: pointer to connection
* @def: pointer to virtual machine structure * @def: pointer to virtual machine structure
* @nveths: number of interfaces
* @veths: interface names
* *
* Sets up the container interfaces by creating the veth device pairs and * Sets up the container interfaces by creating the veth device pairs and
* attaching the parent end to the appropriate bridge. The container end * attaching the parent end to the appropriate bridge. The container end
...@@ -860,7 +865,7 @@ static int lxcVmTerminate(virConnectPtr conn, ...@@ -860,7 +865,7 @@ static int lxcVmTerminate(virConnectPtr conn,
vm->state = VIR_DOMAIN_SHUTDOWN; vm->state = VIR_DOMAIN_SHUTDOWN;
return lxcVMCleanup(conn, driver, vm); return lxcVmCleanup(conn, driver, vm);
} }
static void lxcMonitorEvent(int watch, static void lxcMonitorEvent(int watch,
...@@ -1344,7 +1349,7 @@ cleanup: ...@@ -1344,7 +1349,7 @@ cleanup:
/** /**
* lxcDomainShutdown: * lxcDomainShutdown:
* @dom: Ptr to domain to shutdown * @dom: pointer to domain to shutdown
* *
* Sends SIGINT to container root process to request it to shutdown * Sends SIGINT to container root process to request it to shutdown
* *
...@@ -1477,7 +1482,7 @@ static void lxcDomainEventQueue(lxc_driver_t *driver, ...@@ -1477,7 +1482,7 @@ static void lxcDomainEventQueue(lxc_driver_t *driver,
/** /**
* lxcDomainDestroy: * lxcDomainDestroy:
* @dom: Ptr to domain to destroy * @dom: pointer to domain to destroy
* *
* Sends SIGKILL to container root process to terminate the container * Sends SIGKILL to container root process to terminate the container
* *
......
...@@ -182,12 +182,12 @@ error_out: ...@@ -182,12 +182,12 @@ error_out:
/** /**
* moveInterfaceToNetNs: * moveInterfaceToNetNs:
* @interface: name of device * @iface: name of device
* @pidInNs: PID of process in target net namespace * @pidInNs: PID of process in target net namespace
* *
* Moves the given device into the target net namespace specified by the given * Moves the given device into the target net namespace specified by the given
* pid using this command: * pid using this command:
* ip link set interface netns pidInNs * ip link set @iface netns @pidInNs
* *
* Returns 0 on success or -1 in case of error * Returns 0 on success or -1 in case of error
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册