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 18
18
#include "common/scm.h"
19
19
20
20
static const char * action_names [ACT_MAX ] = {
21
+ [ACT_PRE_STREAM ] = "pre-stream" ,
21
22
[ACT_PRE_DUMP ] = "pre-dump" ,
22
23
[ACT_POST_DUMP ] = "post-dump" ,
23
24
[ACT_PRE_RESTORE ] = "pre-restore" ,
Original file line number Diff line number Diff line change 12
12
#include "rst-malloc.h"
13
13
#include "common/scm.h"
14
14
#include "common/lock.h"
15
+ #include "action-scripts.h"
15
16
16
17
/*
17
18
* 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)
49
50
int img_streamer_init (const char * image_dir , int mode )
50
51
{
51
52
struct sockaddr_un addr ;
53
+ int pre_stream_ret ;
52
54
int sockfd ;
53
55
54
56
img_streamer_mode = mode ;
55
57
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
+
56
64
sockfd = socket (AF_UNIX , SOCK_STREAM , 0 );
57
65
if (sockfd < 0 ) {
58
66
pr_perror ("Unable to instantiate UNIX socket" );
Original file line number Diff line number Diff line change 4
4
#include "asm/int.h"
5
5
6
6
enum script_actions {
7
+ ACT_PRE_STREAM ,
7
8
ACT_PRE_DUMP ,
8
9
ACT_POST_DUMP ,
9
10
ACT_PRE_RESTORE ,
You can’t perform that action at this time.
0 commit comments