File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 1818#include "common/scm.h"
1919
2020static const char * action_names [ACT_MAX ] = {
21+ [ACT_PRE_STREAM ] = "pre-stream" ,
2122 [ACT_PRE_DUMP ] = "pre-dump" ,
2223 [ACT_POST_DUMP ] = "post-dump" ,
2324 [ACT_PRE_RESTORE ] = "pre-restore" ,
Original file line number Diff line number Diff line change 1212#include "rst-malloc.h"
1313#include "common/scm.h"
1414#include "common/lock.h"
15+ #include "action-scripts.h"
1516
1617/*
1718 * We use different path names for the dump and restore sockets because:
@@ -49,10 +50,17 @@ static const char *socket_name_for_mode(int mode)
4950int img_streamer_init (const char * image_dir , int mode )
5051{
5152 struct sockaddr_un addr ;
53+ int pre_stream_ret ;
5254 int sockfd ;
5355
5456 img_streamer_mode = mode ;
5557
58+ pre_stream_ret = run_scripts (ACT_PRE_STREAM );
59+ if (pre_stream_ret != 0 ) {
60+ pr_err ("Pre-stream script failed with %d!\n" , pre_stream_ret );
61+ return -1 ;
62+ }
63+
5664 sockfd = socket (AF_UNIX , SOCK_STREAM , 0 );
5765 if (sockfd < 0 ) {
5866 pr_perror ("Unable to instantiate UNIX socket" );
Original file line number Diff line number Diff line change 44#include "asm/int.h"
55
66enum script_actions {
7+ ACT_PRE_STREAM ,
78 ACT_PRE_DUMP ,
89 ACT_POST_DUMP ,
910 ACT_PRE_RESTORE ,
You can’t perform that action at this time.
0 commit comments